As seen here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88684#c4
GCC libstdc++v3 implementation is __GXX_MERGED_TYPEINFO_NAMES=0 for all targets.
Thus it should be always compared string-wise. And one needs to check for name[0] != '*' as seen in typeinfo
implementation:
libstdc++-v3/libsupc++/typeinfo
We shouldn't need to always check this. Some platforms guarantee unique typeinfo, that's why we have SANITIZER_NON_UNIQUE_TYPEINFO. Please restore the platform dependent code unless you have good reason for removing it (e.g: If typeinfo is not unique on most platforms that the sanitizers support, or if it's too easy to "cheat" when it should be unique and end up with problems).
The check against '*' looks a bit weird and maybe libstdc++ specific. What does it mean? Can you add a comment, please?