aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 8896317..e954700 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -455,6 +455,9 @@ do_friend (tree ctype, tree declarator, tree decl, tree parmdecls,
}
}
+ if (decl == error_mark_node)
+ return error_mark_node;
+
add_friend (current_class_type,
is_friend_template ? DECL_TI_TEMPLATE (decl) : decl,
/*complain=*/true);