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