[cxx-abi-dev] __base_class_type_info offset_flags

Mark Mitchell mark at codesourcery.com
Wed Dec 4 16:01:41 UTC 2002


>> First, G++ does not honor the note; it just uses "long" on all
>> platforms.
>
> What do the other compilers do (HP? Intel?)?

I'm not sure, and that's certainly interesting.

But this is a unique problem in that a changing G++ to match the
spec will mean that upgrading the runtime library in an incompatible
way.  That's different than all of the other problems we've faced, where
the changes are only to the user code.

That has much more substantial impact on the possibility of making the
change.

>> Second, what's the point?  If you just deleted the note, you'd be
>> limited to objects whose sizes are representable in 24-bits on a
>> 32-bit machine.  Well, more properly, if you made bigger objects,
>> you'd not be able to dynamic_cast between subobjects.
>
> I would find this a weird limitation.  If you do remove the note,
> at least add a requirement that implementations must issue errors
> on non-POD types whose size is 2^24 or larger.

On 64-bit systems, we're limited to 2^56 bits, by the ABI.  It's
analagous, even though you can argue that 2^24 bit objects are more
likely than 2^56 bit objects.

(Actually, the offset is a signed quantity, so I suppose its really
2^23 and 2^55 bits.)

I'm not even sure I'd mandate errors; this problem will only affect you
if you're using dynamic_cast, or perhaps exception-handling involving
these objects.  A warning would be nice.

-- 
Mark Mitchell                mark at codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the cxx-abi-dev mailing list