]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cp-demangle.c (__cxa_demangle): Adjust last patch to handle empty string correctly.
authorIan Lance Taylor <ian@wasabisystems.com>
Tue, 24 Feb 2004 04:02:22 +0000 (04:02 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 24 Feb 2004 04:02:22 +0000 (04:02 +0000)
* cp-demangle.c (__cxa_demangle): Adjust last patch to handle
empty string correctly.

From-SVN: r78353

libiberty/ChangeLog
libiberty/cp-demangle.c

index 97ba223979e25a8aa73ab5b7f22c271f88c4cf10..a43fb90272b398b82600469bf9eae37bdd4654e9 100644 (file)
@@ -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.
index 4d0dd7e5b70670a6575d47303a50ec3d6c2a6979..be7a569f0eeae90425fc6d54eb0d8d75443e9c86 100644 (file)
@@ -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)