aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index b2a28e2b846..528d8b7e6d0 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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);