This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling glibc-2.3.2 (-2.3.3?) snapshot 20031115 with gcc-3.4 snapshot 20031119


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


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