Miscompilation of glibc with CVS mainline
Martin v. Löwis
martin@v.loewis.de
Thu Jan 2 20:24:00 GMT 2003
prj@po.cwru.edu (Paul Jarc) writes:
> > 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.
More precisely, it's not a violation, it is an extension (4p8); a
conforming implementation must document what the extensions are and
must diagnose usage of extensions.
For the GCC weak extension, the relevant clause of the standard does
not apply: in a strictly conforming program, the weak extension cannot
be used. The GCC documentation fails to mention that taking the
address of a weak function may yield a null pointer; this is a
documentation bug.
Regards,
Martin
More information about the Libc-alpha
mailing list