RTTI data member names, NTBS COMDAT
Jim Dehnert
dehnert at baalbek.engr.sgi.com
Wed Aug 30 23:11:22 UTC 2000
> From: Mark Mitchell <mark at codesourcery.com>
> Date: Thu, 17 Aug 2000 13:09:12 -0700
>
> I think it's odd that the RTTI data member names are now considered
> non-normative considering that they are public. If they are part of
> the interface, they should have well-defined names -- otherwise, they
> should be private/protected.
I don't recall what the reason was for adding this (or if one was
expressed carefully). In my mind, the two attributes (normative,
public) are somewhat independent. Saying it's non-normative means that
a user program can't depend on it -- its use is restricted to the
implementation. Saying it's private or public is an implementation
choice (if non-normative) based on how easy or hard the implementation
wants to make access elsewhere in the implementation libraries.
Does anyone else have a comment on this issue? Who suggested making
RTTI names non-normative? Why?
> Also, I don't see why the NTBS mangled name (as stored in RTTI data
> structures) should have to be in COMDAT. That seems like a good idea
> -- but doesn't seem mandatory. From a sample of three compilers,
> doing this is rather hard. It's clearly mandatory that the type_info
> objects be in COMDAT, but if the NTBS is duplicated, that only costs
> space; there's no correctness issue.
The reason for this was that the NTBS is the unique key for dealing
with incomplete types, and must resolve everywhere to the same address.
I suppose that making it weak would work as well, or even mixing weak
with COMDAT. Is that true (on all systems)? If so, I don't mind
making the spec more permissive. Anyone else have comments?
Jim
- Jim Dehnert dehnert at sgi.com
(650)933-4272
More information about the cxx-abi-dev
mailing list