aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e35fa07..dc3495f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11252,7 +11252,8 @@ grokdeclarator (tree declarator,
{
/* A friendly class? */
if (current_class_type)
- make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type));
+ make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type),
+ /*complain=*/true);
else
error ("trying to make class `%T' a friend of global scope",
type);