[cxx-abi-dev] A mangling for std::nullptr_t

Jason Merrill jason at redhat.com
Wed Mar 3 20:57:11 UTC 2010


On 03/02/2010 08:49 PM, Dennis Handly wrote:
> I don't see why we would have a RTTI type that doesn't match the mangled name?
> Or are you planning to have both a _ZTIDn but it's virtual table is
> this new __nullptr_type_info?

Huh?  None of the RTTI types match the mangled names of types that use them.

> This wastes storage.  Instead of just a type_info and string, we now have
> to have a virtual table for __nullptr_type_info, and another type_info for
> that.  I.e. instead of using virtual function dispatch, we should consider
> looking at the typeid.
>
> It seems the only special case now is for void, _ZTIv, for catch(...).

We (G++) don't use typeid(void) for catch(...), we use a null catch type.

I notice that there is currently no specification of the EH data 
structures in the abi-eh.html; that seems like a major omission...

> Why not follow the same path?
>     if (catch_type == typeid(std::nullptr_t))

I suppose this would also work, and would indeed save us a few words of 
space in the runtime library.

Jason



More information about the cxx-abi-dev mailing list