Prevents access of data object through an indirect pointer access.
function-parameter __attribute__((noalias));
variable-declaration __attribute__((noalias));
variable-definition __attribute__((noalias));
This attribute specifies to the compiler that a data object is only accessed directly, helping the optimizer to generate a better code. The sample code in Example of the noalias attribute will not return a correct result if ip is pointed to a .
extern int a __attribute__((noalias));
int f(int *ip)
{
a = 1;
*ip = 0;
return a; // optimized to return 1;
}