Miscompilation of glibc with CVS mainline
Paul Jarc
prj@po.cwru.edu
Thu Jan 2 19:26:00 GMT 2003
"John David Anglin" <dave@hiauly1.hia.nrc.ca> wrote:
>> n869 6.3.2.3p3: "[...] the resulting pointer, called a null pointer,
>> is guaranteed to compare unequal to a pointer to any object or
>> function."
>
> Isn't this going to cause a problem with the gcc weak extension
Any program that uses the weak extension is violating the standard, so
gcc is allowed to also violate the standard in a useful way in such a
case. AIUI, the example in this thread does not use the weak
extension, despite its name, so (assuming it does not violate the
standard in other ways by using other extensions) its address must not
be null.
paul
More information about the Libc-alpha
mailing list