I know other questions exist but I still can't wrap my head around this.
Suppose I have the following code:
struct point
{
int x;
int y;
};
void SetPoint(struct point *pt, int x, int y)
{
pt->x = x;
pt->y = y;
}
Can this function be declared __attribute__((pure))
? It is guaranteed to do nothing besides change the value of the structure that is pointed to.
If not, can someone explain why?