This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Compiling glibc-2.3.2 (-2.3.3?) snapshot 20031115 with gcc-3.4 snapshot 20031119
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Matt Austern <austern at apple dot com>
- Cc: Andreas Jaeger <aj at suse dot de>, Dan Kegel <dank at kegel dot com>, gcc at gcc dot gnu dot org, libc-alpha at sources dot redhat dot com, Robert Moss <robert dot moss at jesus dot ox dot ac dot uk>
- Date: Tue, 2 Dec 2003 16:37:59 +0100
- Subject: Re: Compiling glibc-2.3.2 (-2.3.3?) snapshot 20031115 with gcc-3.4 snapshot 20031119
- References: <3FC2F838.4000306@kegel.com> <3FC32EEC.1000802@jesus.ox.ac.uk> <3FC337FF.9040402@jesus.ox.ac.uk> <3FC3458E.4030504@jesus.ox.ac.uk> <3FC38F41.7090908@kegel.com> <3FC4E42A.2040001@jesus.ox.ac.uk> <u84qwjydys.fsf@gromit.moeb> <3FCC4017.8040405@jesus.ox.ac.uk> <ho1xrnpcif.fsf@reger.suse.de> <F96868DA-24ED-11D8-B2C5-00039390D9E0@apple.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Dec 02, 2003 at 09:35:51AM -0800, Matt Austern wrote:
> As you might have noticed from following the discussion on the
> gcc list, the main reason I haven't fixed this yet is that we haven't
> yet reached an agreement about what the semantics of the
> visibility attribute should be when you've got multiple declarations
> of the same symbol.
>
> What assumptions does the glibc source make about this, and how
> tightly wedded are you to those assumptions?
glibc assumes that if there is a decl without visibility attribute
and decl with visibility attribute, that the visibility specified
in the visibility attribute is used.
Say:
int foo (void) __attribute__((visibility ("hidden")));
int bar (void);
...
int foo (void) { return 1; }
int __attribute__((visibility ("hidden"))) bar (void) { return 2; }
then both foo and bar are hidden.
It never uses different visibility attribute in multiple declarations,
like one decl hidden and redeclaration protected, so it is perfectly
fine if gcc issues error for that.
Jakub