diff options
author | Marcus Shawcroft <marcus.shawcroft@arm.com> | 2011-09-27 06:03:58 +0000 |
---|---|---|
committer | Joey Ye <jye2@gcc.gnu.org> | 2011-09-27 06:03:58 +0000 |
commit | 16fa5e238ac913a6713582d7d93e9289d1ac802a (patch) | |
tree | 1737d444e44632ccc7d1ecf5c431c0d1c997f575 /libstdc++-v3 | |
parent | f14e02622f52850e6186887aea6c354f1a7d4b49 (diff) | |
download | gcc-16fa5e238ac913a6713582d7d93e9289d1ac802a.zip gcc-16fa5e238ac913a6713582d7d93e9289d1ac802a.tar.gz gcc-16fa5e238ac913a6713582d7d93e9289d1ac802a.tar.bz2 |
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/tinfo.cc | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 140bdb1..a1b4af02 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc index d939a3f..eba74db 100644 --- a/libstdc++-v3/libsupc++/tinfo.cc +++ b/libstdc++-v3/libsupc++/tinfo.cc @@ -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 } |