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

Paul Koning pkoning@equallogic.com
Fri Dec 13 10:38:00 GMT 2002


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

 Andrew> 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.

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

Morten's comment is still valid for a platform where the encoding of a
null pointer is not the all-zero bitpattern.  (Is there such a
platform?  I've never seen one, but I know they are legal...)

	   paul



More information about the Gcc mailing list