This is the mail archive of the mailing list for the gas2 project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: global vars and symbol visibility for mips32/elf

> From: Ruediger Helsch <>
> > I am quite surprised to find that everybody thinks that GCC and LD
> > should be changed.  We modified them for our Linux distributions because
> > we wanted strict C standard and POSIX conformance.  But the standard
> > conformant behaviour can also break many programs which rely on COMMONS. 
> > We had e.g. to adapt the X11 config files to use "cc -ansi -fcommon".

It would be correct to say that the X programs in question are not strict
ANSI (or ISO), but does the standard mandate that a diagnostic be issued
for such programs, or does it merely leave their behavior undefined or
unspecified?  Just because a test suite complains that it doesn't see
a diagnostic does not mean that a diagnostic is mandated.

Ulrich Drepper writes:
> I don't think at all that the standard behaviour should be to disallow
> commons.  We use it in some places in glibc.

Having -ansi imply -fno-common but not having it be the default is an
option (I'm not sure it is the right option).

> It should be disallowed to match a common var with a function in the
> shared.  This never makes sense.


> I think gcc -ansi should really be ANSI compliant (btw, what about
> changing the name to -iso since the official name is ISO C?)

If you wish to add -iso as a synonym, fine.  But ANSI is just as official
as ISO (in a more limited geographical area, of course), and the switch
is in wide use.