The scenario:
Suppose I have a struct
type holding a bunch of pointers, all of which declared restrict
, and a function which takes a couple of these struct
as argument as follows:
struct bunch_of_ptr
{
double *restrict ptr00;
double *restrict ptr01;
...
double *restrict ptr19;
}
void evaluate(struct bunch_of_ptr input, struct bunch_of_ptr output)
{
// do some calculation on input and return results into output
}
According to http://www.oracle.com/technetwork/server-storage/solaris10/cc-restrict-139391.html, input.ptrXX
and input.ptrYY
will be treated as non-aliasing.
The question:
Will the compiler treat input.ptrXX
and output.ptrYY
as non-aliasing as well?