summaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-16 15:42:15 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-16 15:42:15 +0000
commit6994351f026f1068c7c2e91d4e06d97323c685f2 (patch)
treece989dcd709f54247a75f3bf17e5c9c1ca60836c /gcc/cp/friend.c
parent3fad71f2e3aaad96a3c32ec7120015207bed5704 (diff)
downloadgcc-6994351f026f1068c7c2e91d4e06d97323c685f2.tar.gz
PR c++/5421
* decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend is a member of other class. * friend.c (do_friend): Don't build TEMPLATE_DECL if friend is a specialization of function template. * g++.dg/template/friend21.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69457 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 220b01214bb..e31a0559a0f 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -357,6 +357,8 @@ do_friend (tree ctype, tree declarator, tree decl, tree parmdecls,
if (is_friend_template)
decl = DECL_TI_TEMPLATE (push_template_decl (decl));
+ else if (DECL_TEMPLATE_INFO (decl))
+ ;
else if (template_class_depth (current_class_type))
decl = push_template_decl_real (decl, /*is_friend=*/1);