]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
parser.c (cp_parser_using_declaration): Skip name-lookup on invalid scope.
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Mon, 2 Jan 2006 16:19:26 +0000 (16:19 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Mon, 2 Jan 2006 16:19:26 +0000 (16:19 +0000)
* 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
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/using12.C

index c895ce58f862cd30d5fc700be953cfa6d676f22b..d2b4c81a74f9a5c9b4904fcadf7fe43400520b52 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * parser.c (cp_parser_using_declaration): Skip name-lookup on
+       invalid scope.
+
 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        * cxx-pretty-print.c (pp_cxx_constant): New.  Print
index 86d7edbcc47a3eee0a18131a4b30ee8733393e1a..90d1486cdd59f279d333727363b77fc4443f4c44 100644 (file)
@@ -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)
index 9e9c2b1286d95b86402be2a14df327d96686d7e5..10f7c252f9380d385af06c8d704e8cada96a3334 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * g++.dg/lookup/using12.C: Tighten error marker.
+
 2006-01-01  Andreas Tobler  <a.tobler@schweiz.ch>
            Andrew Pinski <pinskia@physics.uc.edu>
 
index 030385581a5e3ad21256f90ed1d316e05610d508..4aa5ce681808b9bfaa5c918cf934d7e8351ccf25 100644 (file)
@@ -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" }