Eric Botcazou wrote: >>The name here would seem to imply that we *are* mangling the type >>name: "typeinfo for foo()::S". Which begs the question of why you're >>seeing something different for ia64. > > > Both names are mangled identically (either on IA-32 or IA-64) because they > are > supposed to be local to the translation unit.
Correct. This test case is valid, and the results observed are in incorrect; in other words, yes, there is a bug. In general, comparison of type_info objects is supposed to be done by checking for address equality of the type info strings. On systems without weak symbols, we use strcmp. (Look for __GXX_MERGED_TYPEINFO_NAMES in <typeinfo>.) In the situation where we use strcmp, I would expect to see this bug. In the situation where we do not use strcmp, I would not expect to see that bug -- because I would expect that the type_info objects and the corresponding type_info strings are local symbols. If that is not the case, then that is the bug. -- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (916) 791-8304