aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-07-16 15:42:15 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-07-16 15:42:15 +0000
commit866eb556c2328fa391890173a91c3108db66317b (patch)
treece989dcd709f54247a75f3bf17e5c9c1ca60836c /gcc/cp/friend.c
parent94b7906a3a8ea86c701bef97d31f6fdf22db7fc7 (diff)
downloadgcc-866eb556c2328fa391890173a91c3108db66317b.zip
gcc-866eb556c2328fa391890173a91c3108db66317b.tar.gz
gcc-866eb556c2328fa391890173a91c3108db66317b.tar.bz2
re PR c++/5421 (friends+templates: ICE: expected identifier_node, have template_id_expr in grokfndecl, at cp/decl.c:8835)
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. From-SVN: r69457
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 220b012..e31a055 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);