This is the mail archive of the
mailing list for the GCC project.
Re: RFC: C++: __attribute__((visibility)) for classes
Matt Austern wrote:
I don't see how they could be. That's the translation unit where
they're defined, but in the general case there are undefined
references from other translation units.
There is an alternate solution to this problem, being specified for
ARM's EABI. In short, the visibility of the vtables and such is derived
from dllimport/dllexport of the key function. Then, the user just
specifies visibility for functions, and the compiler does the rest.
We're anticipating implementing this in the next few months, but I'm not
going to stop you from ipmlementing it first. See:
I'd prefer that we avoid having lots of ways to do the same thing in the
compiler in this respect, but that may be a futile hope...