Miscompilation of glibc with CVS mainline

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Jan 2 19:16:00 GMT 2003


> "John David Anglin" <dave@hiauly1.hia.nrc.ca> wrote:
> > I can't seem to find where the standard says &weak_func is always
> > unequal to null.
> 
> 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 and the
treatment of undefined weak functions in the system V ABI?  Specifically,
it would then appear that weak function pointers need to treated differently.
How can any specific code know whether a function pointer resolves to a weak
function or not when it is extern?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc mailing list