]> git.ipfire.org Git - thirdparty/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:56:11 +0000 (08:56 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Wed, 31 Aug 2005 08:56:11 +0000 (08:56 +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: r103664

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

index d10e55cf623856e5cc322e6da94b5f0bcacea76a..82431b4a0a76b782fa8226326a5ddb7da996eff7 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-07-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        Backport:
index bb2f3c925ad4b2dfd24fc625111d5c05e6e75b56..55984b75ade24d383e7939ec28abf69ff154fdb1 100644 (file)
@@ -2295,7 +2295,9 @@ check_multiple_declarators (void)
 void
 qualified_name_lookup_error (tree scope, tree name)
 {
-  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 `%T' used in nested name specifier", scope);
index 4c3a9a6a22ab81cb00d1be80ce6d8c453b2577ae..4f18fa1ad3a2128b03ded424d1033ce50e3f31c1 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-08  Josh Conner  <jconner@apple.com>
 
        PR rtl-optimization/23241
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" }
 };