HP's object layout, clarification

thomson at ca.ibm.com thomson at ca.ibm.com
Fri Jun 11 18:22:43 UTC 1999


Cary, your object layout description makes this statement:

    The C++ language allows an empty base-class to share
    its location with its descendents ...
    ... but also imposes the following INequalities:

    (void*)&empty != (void*)&also_empty
    (void*)&(Empty2&)bug != (void*)&(AlsoEmpty&)bug

    I.e., for two subobjects to have the same address,
    one must be derived from the other

I see this asserted in section 10.0 of the spec for subobjects
"that have the same class type", but not for subobjects in general.
Do you have a supporting citation?


Brian Thomson
VisualAge C/C++ Chief Architect






More information about the cxx-abi-dev mailing list