From 56bbd9d6aa0374c942f843ab796bbcf7eab6e39d Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Mon, 2 Jan 2006 16:19:26 +0000 Subject: parser.c (cp_parser_using_declaration): Skip name-lookup on invalid scope. * parser.c (cp_parser_using_declaration): Skip name-lookup on invalid scope. * g++.dg/lookup/using12.C: Tighten error marker. From-SVN: r109237 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/lookup/using12.C | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c895ce5..d2b4c81 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-02 Volker Reichelt + + * parser.c (cp_parser_using_declaration): Skip name-lookup on + invalid scope. + 2005-12-30 Gabriel Dos Reis * cxx-pretty-print.c (pp_cxx_constant): New. Print diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 86d7edbc..90d1486 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10486,7 +10486,7 @@ cp_parser_using_declaration (cp_parser* parser) /* The function we call to handle a using-declaration is different depending on what scope we are in. */ - if (identifier == error_mark_node) + if (qscope == error_mark_node || identifier == error_mark_node) ; else if (TREE_CODE (identifier) != IDENTIFIER_NODE && TREE_CODE (identifier) != BIT_NOT_EXPR) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9e9c2b1..10f7c25 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-01-02 Volker Reichelt + + * g++.dg/lookup/using12.C: Tighten error marker. + 2006-01-01 Andreas Tobler Andrew Pinski diff --git a/gcc/testsuite/g++.dg/lookup/using12.C b/gcc/testsuite/g++.dg/lookup/using12.C index 03038558..4aa5ce6 100644 --- a/gcc/testsuite/g++.dg/lookup/using12.C +++ b/gcc/testsuite/g++.dg/lookup/using12.C @@ -1,4 +1,4 @@ // PR c++/16707 int i; -using N::i; // { dg-error "declared|expected" } +using N::i; // { dg-error "'N' has not been declared" } -- cgit v1.1