This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Miscompilation of glibc with CVS mainline
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: prj at po dot cwru dot edu (Paul Jarc)
- Cc: gcc at gcc dot gnu dot org, libc-alpha at sources dot redhat dot com
- Date: Thu, 2 Jan 2003 14:16:03 -0500 (EST)
- Subject: Re: Miscompilation of glibc with CVS mainline
> "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)