summaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 01c5d9438f2..20bb5d82721 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -362,7 +362,7 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist,
/* A nested class may declare a member of an enclosing class
to be a friend, so we do lookup here even if CTYPE is in
the process of being defined. */
- else if (TYPE_SIZE (ctype) != 0 || TYPE_BEING_DEFINED (ctype))
+ else if (COMPLETE_TYPE_P (ctype) || TYPE_BEING_DEFINED (ctype))
{
decl = check_classfn (ctype, decl);