[Bug c++/14819] New: Explicit class:: inside class scope does not work

jan.kratochvil at redhat dot com sourceware-bugzilla@sourceware.org
Thu Nov 8 17:11:00 GMT 2012


http://sourceware.org/bugzilla/show_bug.cgi?id=14819

             Bug #: 14819
           Summary: Explicit class:: inside class scope does not work
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
    Classification: Unclassified
            Target: x86_64-unknown-linux-gnu


class C {
public:
  int x;
  C():x(42) {}
  int f() {
    return C::x;
  }
} c;
int main() { c.f(); }
-------------------------------------------------------------------------------
(gdb) break C::f
(gdb) run
[...]
Breakpoint 1, C::f (this=0x601030 <c>) at cscope.C:6
6        return C::x;
(gdb) print x
$1 = 42

FAIL - Actual:
(gdb) print C::x
A syntax error in expression, near `x'.

Expacted:
(gdb) print C::x
$2 = 42

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Gdb-prs mailing list