This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Demangling anonymous namespace


A patch to demangle f__16_GLOBAL_.N.a1.iii as #anonymous::f(int)
is included below.

Martin

1998-06-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>

	* cplus-dem.c (demangle_arm_pt): Demangle anonymous namespaces.

Index: cplus-dem.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cplus-dem.c,v
retrieving revision 1.21
diff -c -p -r1.21 cplus-dem.c
*** cplus-dem.c	1998/05/22 00:39:44	1.21
--- cplus-dem.c	1998/06/01 08:25:35
*************** demangle_arm_pt (work, mangled, n, declp
*** 1632,1637 ****
--- 1632,1644 ----
        --declp->p;
        string_append (declp, ">");
      }
+   else if (n>10 && strncmp (*mangled, "_GLOBAL_", 8) == 0
+ 	   && (*mangled)[9] == 'N'
+ 	   && (*mangled)[8] == (*mangled)[10]
+ 	   && strchr (cplus_markers, (*mangled)[8]))
+     {
+       string_append (declp, "#anonymous");
+     }
    else
      {
        string_appendn (declp, *mangled, n);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]