This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc visibility used by moz
- From: Benjamin Smedberg <benjamin at smedbergs dot us>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 17 Jul 2006 11:25:40 -0400
- Subject: Re: gcc visibility used by moz
- References: <44B412CC.5000507@smedbergs.us> <44B41C1A.3010000@redhat.com> <44B4F81C.3060705@smedbergs.us> <44B564B0.20101@redhat.com>
Jason Merrill wrote:
OK, you've convinced me that the compiler shouldn't override or complain
about explicit visibility attributes. Do you have a problem with
implicit propagation of visibility in the absence of an attribute?
Specifically:
Do you agree with implicitly giving template instantiations the minimum
visibility of the template and arguments unless explicitly overridden?
Thinking about this further and reading the discussion that's flowed around,
I tend to want to change my opinion to say that argument types should not
affect the visibility of a symbol at all. It breaks compatibility with
existing usage in gcc 4.0/4.1, as well as being a non-obvious change
(especially for pointer types, which, absent questions of dynamic casting
and RTTI can safely be passed across DSO boundaries). At least in the case
of Mozilla, RTTI is a non-issue.
Perhaps the compiler should issue a warning in such cases that RTTI may not
work correctly.
--BDS