On 09/13/2011 09:29 PM, Jiangning Liu wrote:
In "C++ ABI for the ARM architecture", it says,

============================

This runs contrary to ยง2.9.1 of [GC++ABI] which states:

It is intended that two type_info pointers point to equivalent type
descriptions if and only if the pointers are equal. An implementation must
satisfy this constraint, e.g. by using symbol preemption, COMDAT sections,
or other mechanisms.

Fortunately, we can ignore this requirement without violating the C++
standard provided that:

* type_info::operator== and type_info::operator!= compare the strings
returned by type_info::name(), not just the pointers to the RTTI objects and
their names.

* No reliance is placed on the address returned by type_info::name(). (That
is, t1.name() != t2.name() does not imply that t1 != t2).

============================

This test is not specific to the normal C++ ABI, it's standard C++; if it fails on ARM EABI targets, that's a bug that should be fixed, probably using the same initial '*' trick that we use on other platforms.

Jason

Reply via email to