This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/1134: can't demangle V2 nested anonymous namespaces


>Number:         1134
>Category:       c++
>Synopsis:       can't demangle V2 nested anonymous namespaces
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 10 23:58:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     carlton at math dot stanford dot edu
>Release:        GNU gdb 2003-03-10-cvs
>Organization:
>Environment:
any
>Description:
The demangler can't demangle anonymous namespaces that
are contained in other namespaces.  E.g. given

namespace C {
  namespace {
    int cX;
  }
}

you might get a mangled name like

_Q21C27_GLOBAL_.N.fum__Q23AAA3inAi.cX

if you compile this with GCC 2.95.3.  And the demangler
can't demangle that.

It can demangle top-level anonymous namespaces:

namespace {
  int X;
}

demangles to {anonymous}::X.  (I wish it were
(anonymous namespace)::X, as in V3; that's another matter).

Of course, GCC 2.95.3 didn't support namespaces 
all that well to begin with.
>How-To-Repeat:
GNU gdb 2003-03-10-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) maint demangle _Q21C27_GLOBAL_.N.fum__Q23AAA3inAi.cX
Can't demangle "_Q21C27_GLOBAL_.N.fum__Q23AAA3inAi.cX"
(gdb) maint demangle _27_GLOBAL_.N.fum__Q23AAA3inAi.X
{anonymous}::X
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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