OSDN Git Service

* cplus-dem.c (do_type): Handle pointer to member types whose
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 1999 08:32:10 +0000 (08:32 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Oct 1999 08:32:10 +0000 (08:32 +0000)
enclosing classes have namespace scope.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29901 138bc75d-0d04-0410-961f-82ee72b054a4

libiberty/ChangeLog
libiberty/cplus-dem.c
libiberty/testsuite/demangle-expected

index e80098e..05dfb36 100644 (file)
@@ -1,3 +1,8 @@
+1999-10-11  Mark Mitchell  <mark@codesourcery.com>
+
+       * cplus-dem.c (do_type): Handle pointer to member types whose
+       enclosing classes have namespace scope.
+
 Sun Oct 10 01:23:50 1999  Marc Espie <espie@cvs.openbsd.org>
 
        * config.table:  Provide a backup shell for executing move-if-change.
index ef6c511..6a6bc1a 100644 (file)
@@ -3072,7 +3072,12 @@ do_type (work, mangled, result)
            (*mangled)++;
 
            string_append (&decl, ")");
-           string_prepend (&decl, SCOPE_STRING (work));
+
+           /* We don't need to prepend `::' for a qualified name;
+              demangle_qualified will do that for us.  */
+           if (**mangled != 'Q')
+             string_prepend (&decl, SCOPE_STRING (work));
+
            if (isdigit ((unsigned char)**mangled))
              {
                n = consume_count (mangled);
@@ -3105,6 +3110,14 @@ do_type (work, mangled, result)
                else
                  break;
              }
+           else if (**mangled == 'Q')
+             {
+               success = demangle_qualified (work, mangled, &decl,
+                                             /*isfuncnam=*/0, 
+                                             /*append=*/0);
+               if (!success)
+                 break;
+             }
            else
              {
                success = 0;
index ad04d11..0156d27 100644 (file)
@@ -2470,3 +2470,7 @@ _Utf390_1__1_9223372036854775807__9223372036854775
 --format=gnu
 call__H1Z4Test_RX01_t1C2ZX01PMX01FPX01i_vQ2X016output
 C<Test, Test::output> call<Test>(Test &)
+#
+--format=gnu
+fn__FPQ21n1cPMQ21n1cFPQ21n1c_i
+fn(n::c *, int (n::c::*)(n::c *))