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: 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:


http://www.armdevzone.com/EABI/exported_class.txt

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...

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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