RFC: C++: __attribute__((visibility)) for classes

Matt Austern austern@apple.com
Wed May 19 20:43:00 GMT 2004


On May 19, 2004, at 12:13 PM, Gabriel Dos Reis wrote:

Matt Austern <austern@apple.com> writes:

[...]

| I believe that any sensible solution has to be in the compiler.
| Asking users to explicitly list the symbols they want to hind is
| unreasonable: ordinary users shouldn't have to know which classes 
will
| need VTTs, construction vtables, and the like, and certainly 
shouldn't
| have to know the mangled names for those ghastly things.  Even your
| average guru would probably get it wrong most of the time.  I'm sure 
I
| would.

A question:  Why would those symbols be "exported" in the first place?
If I understand correctly, they are emitted in the translation unit
that contains the key-method, wouldn't it make sense to have them
local to that translation unit?
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.
			--Matt




More information about the Gcc mailing list