This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Demangling anonymous namespace
- To: egcs-patches at cygnus dot com
- Subject: Demangling anonymous namespace
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Mon, 1 Jun 1998 10:32:22 +0200
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);