This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Aggressive load in gcc when accessing escaped pointer?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]