This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c/13134] [3.4 regression] Visibility attribute is ignored


------- Additional Comments From austern at apple dot com  2003-12-01 01:10 -------
Subject: Re:  [3.4 regression] Visibility attribute is ignored

On Nov 29, 2003, at 5:19 PM, carlo at gcc dot gnu dot org wrote:

>
> ------- Additional Comments From carlo at gcc dot gnu dot org  
> 2003-11-30 01:19 -------
> Pleases note that the test case of PR 13227 was NOT fixed by the patch 
> proposed
> in this thread.
>
> It _was_ fixed by reverting the patch of 6 Nov.
>
> Can the one who writes a patch to fix this PR (Matt?)
> please also run the test case of PR 13227
> on an i686-pc-linux-gnu box?

I will indeed provide test cases when I fix this bug.  The main problem
right now is figuring out exactly what "fix" means: that is, what should
the semantics be for multiple declarations of the same symbol with
different visibilities?  The old behavior before my patch, and the new
behavior with my patch, both seem to be accidental implementation
artifacts.  Neither is documented anywhere and neither seems very easy
to justify.

There's discussion of this on the gcc@gcc.gnu.org mailing list.  I've
seen two proposals that seem reasonable: (1) It is an error for multiple
declarations to have different visibilities.  (2) A latter declaration
may override the visibility of an earlier declaration, but only by
making the visibility more restrictive.  There's some justification for
option 2 from the ELF gABI.

			--Matt



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13134


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