optimization/7799: [3.2/3.3 regression] Loop bug withoptimization flag -Os in gcc

Andrew Haley aph@redhat.com
Fri Dec 13 09:09:00 GMT 2002


Morten Welinder writes:
 > 
 > Andreas Schwab writes:
 > 
 > > "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de> writes:
 > >|> By calling fill ((int*) 0xffffffc, q);
 > 
 > > Undefined behaviour.
 > 
 > True, but its_somewhere_in_my_libc() is not.  Implementation defined,
 > yes, but not undefined.
 > 
 > A quick scan of mmap's manual page suggests that it is not completely
 > ruled out that you would get 0xfffffffc for an area that includes
 > space for ten ints thereafter.

It is: a null pointer is guranteed to compare unequal to a pointer to
any object.

See C90, Section 6.2.2.3.  

Andrew.



More information about the Gcc mailing list