From af53d23161e42735bc2adbb8236d411a307b574c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 28 Jun 2010 20:18:27 +0000 Subject: [PATCH] gdb/ Fix PR c++/11703 and PR gdb/1448. * c-exp.y (yylex) : Add FIRST_ITER check. gdb/testsuite/ Test PR c++/11703 and PR gdb/1448. * gdb.cp/namespace.exp (ptype ::C::NestedClass): Remove KFAIL for gdb/1448. --- gdb/ChangeLog | 6 ++++++ gdb/c-exp.y | 2 +- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.cp/namespace.exp | 1 - 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 196f89962d..78dcf55afe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-06-28 Jan Kratochvil + + Fix PR c++/11703 and PR gdb/1448. + * c-exp.y (yylex) : Add + FIRST_ITER check. + 2010-06-28 Jan Kratochvil Fix modification of cplus_struct_default. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 4db41033db..030554c982 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -2553,7 +2553,7 @@ yylex (void) { token_and_value cc; memset (&cc, 0, sizeof (token_and_value)); - if (first_was_coloncolon) + if (first_was_coloncolon && first_iter) { yylval = cc.value; return COLONCOLON; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e187d045e9..05a51316ff 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-06-28 Jan Kratochvil + + Test PR c++/11703 and PR gdb/1448. + * gdb.cp/namespace.exp (ptype ::C::NestedClass): Remove KFAIL for + gdb/1448. + 2010-06-28 Jan Kratochvil * gdb.cp/virtbase.cc (class RTTI_base, class RTTI_data) diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp index 97521a17eb..95038fd7b8 100644 --- a/gdb/testsuite/gdb.cp/namespace.exp +++ b/gdb/testsuite/gdb.cp/namespace.exp @@ -192,7 +192,6 @@ gdb_test "ptype CClass::NestedClass" "type = (class C::CClass::NestedClass \{\r\ gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context." gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}" gdb_test "ptype ::C::CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}" -setup_kfail "gdb/1448" "*-*-*" gdb_test "ptype ::C::NestedClass" "No symbol \"NestedClass\" in namespace \"C\"." gdb_test "ptype C::CClass" "No symbol \"CClass\" in namespace \"C::C\"." gdb_test "ptype C::CClass::NestedClass" "No type \"CClass\" within class or namespace \"C::C\"." -- 2.34.1