Commit 16fa5e23 by Marcus Shawcroft Committed by Joey Ye

tinfo.cc (type_info::operator==): Test __name instead of name().

2011-09-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* libsupc++/tinfo.cc (type_info::operator==): Test __name instead
	of name().

From-SVN: r179236
parent f14e0262
2011-09-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
* libsupc++/tinfo.cc (type_info::operator==): Test __name instead
of name().
2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/50529
......
......@@ -41,8 +41,11 @@ operator== (const std::type_info& arg) const
#if __GXX_MERGED_TYPEINFO_NAMES
return name () == arg.name ();
#else
/* The name() method will strip any leading '*' prefix. Therefore
take care to look at __name rather than name() when looking for
the "pointer" prefix. */
return (&arg == this)
|| (name ()[0] != '*' && (__builtin_strcmp (name (), arg.name ()) == 0));
|| (__name[0] != '*' && (__builtin_strcmp (name (), arg.name ()) == 0));
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment