re PR c++/23639 (Bad error message: not a member of '<declaration error>')

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
This commit is contained in:
Volker Reichelt 2005-08-31 08:46:46 +00:00 committed by Volker Reichelt
parent ab17392846
commit 1e1b4b377c
4 changed files with 15 additions and 2 deletions

View 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

View 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);

View 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

View 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" }
};