diff options
author | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-16 15:42:15 +0000 |
---|---|---|
committer | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-16 15:42:15 +0000 |
commit | 6994351f026f1068c7c2e91d4e06d97323c685f2 (patch) | |
tree | ce989dcd709f54247a75f3bf17e5c9c1ca60836c /gcc/cp/friend.c | |
parent | 3fad71f2e3aaad96a3c32ec7120015207bed5704 (diff) | |
download | gcc-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.c | 2 |
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); |