This is the mail archive of the gcc@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]

Re: gcc visibility used by moz


Benjamin Smedberg wrote:
Jason Merrill wrote:

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

For a namespace-scope entity like this, yes (class members and template instantiations use the visibility of their class and template in preference to the current #pragma).


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 ;-)

I find that surprising, since it sounds like VC++ gives the same warning about a dllexport class with a non-dllexport base.


Jason


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