]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cplus-dem.c (demangle_signature): Don't look for return types on constructors.
authorMark Mitchell <mmitchell@usa.net>
Tue, 14 Oct 1997 19:12:27 +0000 (19:12 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 14 Oct 1997 19:12:27 +0000 (15:12 -0400)
* cplus-dem.c (demangle_signature): Don't look for return types on
constructors.  Handle member template constructors.

From-SVN: r15903

gcc/ChangeLog
gcc/cplus-dem.c

index 51f65b0cc655ba01b28f704a42f38d4235455179..0e8a1efd6255848ab93edf082d1391f407541ef4 100644 (file)
@@ -1,3 +1,8 @@
+Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
+
+       * cplus-dem.c (demangle_signature): Don't look for return types on
+       constructors.  Handle member template constructors.
+
 Tue Oct 14 11:30:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * tree.c (expr_tree_cons, build_expr_list, expralloc): New fns.
index 055ab0818e5d9e0e0608e7c4e34b4ea2ff6df192..58f37688b6bd76fedded1bfad7742d0e8835e4ca 100644 (file)
@@ -831,7 +831,8 @@ demangle_signature (work, mangled, declp)
            {
              /* A G++ template function.  Read the template arguments. */
              success = demangle_template (work, mangled, declp, 0, 0);
-             expect_return_type = 1;
+             if (!(work->constructor & 1))
+               expect_return_type = 1;
              (*mangled)++;
              break;
            }
@@ -1534,7 +1535,8 @@ demangle_prefix (work, mangled, declp)
        }
     }
   else if ((scan == *mangled)
-          && (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')))
+          && (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')
+              || (scan[2] == 'H')))
     {
       /* The ARM says nothing about the mangling of local variables.
         But cfront mangles local variables by prepending __<nesting_level>
@@ -1551,7 +1553,8 @@ demangle_prefix (work, mangled, declp)
        {
          /* A GNU style constructor starts with __[0-9Qt].  But cfront uses
             names like __Q2_3foo3bar for nested type names.  So don't accept
-            this style of constructor for cfront demangling.  */
+            this style of constructor for cfront demangling.  A GNU
+            style member-template constructor starts with 'H'. */
          if (!(LUCID_DEMANGLING || ARM_DEMANGLING))
            work -> constructor += 1;
          *mangled = scan + 2;