Aggressive load in gcc when accessing escaped pointer?

Michael Matz matz@suse.de
Mon Mar 21 14:52:00 GMT 2016


Hi,

On Sat, 19 Mar 2016, Cy Cheng wrote:

> But I don't understand why &c - 8 is invalid? Which rule in C99 it volatile?

&x points to the start of object x, and &x - something (something != 0) 
points outside object x.  'c' was a complete object, so &c-8 points 
outside any object, hence the formation of that pointer is already 
invalid (as is its dereference).


Ciao,
Michael.



More information about the Gcc mailing list