So my understanding is that the C99 standard mandates that pointers to different types should not be aliased (i.e. pointed to the same memory). The restrict
keyword assures the compiler that two certain variables (of the same type?) are not located in the same memory slot.
Therefore, is it true, that the following function would not profit form the restrict
keyword?
void sphere_intersect(float* t, const sphere* s, const ray* r);
But, a function like this would:
void vector_add(vector* v, const vector* u);