diff options
author | Ian Lance Taylor <ian@wasabisystems.com> | 2004-02-24 04:02:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2004-02-24 04:02:22 +0000 |
commit | e8ed4ac21eab7729d8fc57f313317c5a414f78ce (patch) | |
tree | 6fc1328e20e8ac209f7778f91545696375e14ba0 /libiberty | |
parent | fa0ac78a2756b7f0ae209b4191de18b1b6f9b316 (diff) | |
download | gcc-e8ed4ac21eab7729d8fc57f313317c5a414f78ce.zip gcc-e8ed4ac21eab7729d8fc57f313317c5a414f78ce.tar.gz gcc-e8ed4ac21eab7729d8fc57f313317c5a414f78ce.tar.bz2 |
cp-demangle.c (__cxa_demangle): Adjust last patch to handle empty string correctly.
* cp-demangle.c (__cxa_demangle): Adjust last patch to handle
empty string correctly.
From-SVN: r78353
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 3 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 97ba223..a43fb90 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,8 @@ 2004-02-23 Ian Lance Taylor <ian@wasabisystems.com> + * cp-demangle.c (__cxa_demangle): Adjust last patch to handle + empty string correctly. + * cp-demangle.c (__cxa_demangle): It is not an error if status is not NULL. It is an error if the mangled name is the same as a built-in type name. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 4d0dd7e..be7a569 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3964,8 +3964,8 @@ __cxa_demangle (mangled_name, output_buffer, length, status) internal built-in type names are a single lower case character. Frankly, this simplistic disambiguation doesn't make sense to me, but it is documented, so we implement it here. */ - if (mangled_name[1] == '\0' - && IS_LOWER (mangled_name[0]) + if (IS_LOWER (mangled_name[0]) + && mangled_name[1] == '\0' && cplus_demangle_builtin_types[mangled_name[0] - 'a'].name != NULL) { if (status != NULL) |