]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/23639 (Bad error message: not a member of '<declaration error>')
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Wed, 31 Aug 2005 08:46:46 +0000 (08:46 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Wed, 31 Aug 2005 08:46:46 +0000 (08:46 +0000)
PR c++/23639
* semantics.c (qualified_name_lookup_error): Do not complain again
on invalid scope.

* g++.dg/template/ttp5.C: Adjust error markers.

From-SVN: r103662

gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/ttp5.C

index cc107753e19edf5caa91710a33ddbcc161462fbf..cc6a9696873ec3190502540885e988090c275e3e 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/23639
+       * semantics.c (qualified_name_lookup_error): Do not complain again
+       on invalid scope.
+
 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/23586
index b2a28e2b846a069ff86b3ccb968c7ee36ed757d0..528d8b7e6d0c4fc8950382928c446033e6bc7b77 100644 (file)
@@ -2395,7 +2395,9 @@ finish_base_specifier (tree base, tree access, bool virtual_p)
 void
 qualified_name_lookup_error (tree scope, tree name, tree decl)
 {
-  if (TYPE_P (scope))
+  if (scope == error_mark_node)
+    ; /* We already complained.  */
+  else if (TYPE_P (scope))
     {
       if (!COMPLETE_TYPE_P (scope))
        error ("incomplete type %qT used in nested name specifier", scope);
index ee019b98f0695ece7693d51fb8d295304b13599c..e457ae40d42b6643309c6c018ffba31bbfe22f65 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/23639
+       * g++.dg/template/ttp5.C: Adjust error markers.
+
 2005-08-30  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR testsuite/23609
index d26b8164eed8b62a37428941e7c63bc8dc8b4eaf..ee9d1ff7cc95e7fc1a909dc66dc65ec295ea0759 100644 (file)
@@ -16,5 +16,5 @@ template <template <int> class F> struct C {
 };
 
 template <int n> struct D {
-  enum { v = C<A<n>::B>::v }; // { dg-error "mismatch|class template|not a member" }
+  enum { v = C<A<n>::B>::v }; // { dg-error "mismatch|class template" }
 };
This page took 0.093676 seconds and 5 git commands to generate.