Could someone please explain how this line:
"(* p=* p) & (* q=* q);"
"inform[s] the compiler that f2() will never be called with aliasing arguments."
Thanks
"(* p=* p) & (* q=* q);"
"inform[s] the compiler that f2() will never be called with aliasing arguments."
Thanks
It's a common approach in C compilers for inferring more optimization-relevant semantics than the language constructs explicitly specify.
See also the C99 rationale:
"Undefined behavior gives the implementor license not to catch certain program errors that are difficult to diagnose. It also identifies areas of possible conforming language extension: the implementor may augment the language by providing a definition of the officially undefined behavior."
Undefined behavior only occurs in case of program errors or language extensions, in which case you're not dealing with standard C, but C-with-extensions.