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: Wed, 12 Jul 2006 17:24:14 -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?
This is not what I would naturally expect, coming from a dllimport/export
mindset, but I don't think it's a problem from the mozilla POV: all of our
exports are explicitly declared if/when we use hidden visibility pragmas.
Is a pragma considered an explicit override? e.g.
class nsIAbstract {
virtual void Bar();
};
#pragma GCC visibility push(default)
nsIAbstract* Getter();
#pragma GCC visibility pop
Also, do you agree with warning about a class with greater visibility
than its data members/bases?
Sure... I would really like to disable this warning if possible, since it
will be produced thousands of times in a mozilla build ;-)
--BDS