This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cxx-abi-dev] comparing type_infos (was Re: Patch for throw/catch problems)
>>>>> "Jason" == Jason Merrill <jason_merrill@redhat.com> writes:
> I believe that this is a case of obsolete wording; since we decided to
> commonize the NTBS, there is no reason to allow implementations to rely
> on being able to compare the type_info node addresses directly. We
> certainly handle type_info comparison by looking at the NTBS address;
> would anyone object to new wording to disallow comparison of type_info
> node addresses?
It occurs to me that even if we do this, we need to consider the case of a
polymorphic class for which we only emit the vtable, and thus the
type_info, in one place. The type_info would still need to be addressable
from outside the shared object where it is defined, though we could bind
strongly within the shared object.
Or we could change gcc to always generate type_infos wherever referenced; I
believe that would be conformant, though I'm not sure it would be a win.
Jason