This is the mail archive of the gdb-prs@sourceware.org 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]

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


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.


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