Bug 12284

Summary: IWBN to not have to quote anonymous namespaces
Product: gdb Reporter: dje
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: dmalcolm, tromey
Priority: P2    
Version: HEAD   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description dje 2010-12-02 17:39:41 UTC
This works:

(gdb) p 'foo::(anonymous namespace)::bar'

This doesn't, but IWBN if it did:

(gdb) p foo::(anonymous namespace)::bar

Testcase:

namespace foo
{
  namespace
  {
    int bar;
  }
}

int
main ()
{
  return 0;
}
Comment 1 Tom Tromey 2013-03-06 19:39:17 UTC
It seems to me that having to enter "(anonymous namespace)"
at all is a bug.  At least as far as expression parsing goes --
I'm less sure about linespecs.
Comment 2 Tom Tromey 2013-07-14 18:26:35 UTC
(In reply to Tom Tromey from comment #1)
> It seems to me that having to enter "(anonymous namespace)"
> at all is a bug.  At least as far as expression parsing goes --
> I'm less sure about linespecs.

It seems to me now that this should also be droppable for
linespecs.