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

Reply via email to