diff options
Diffstat (limited to 'gcc/cp/friend.c')
| -rw-r--r-- | gcc/cp/friend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index c81bd934e0a..e55adaa8bc0 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -397,7 +397,10 @@ do_friend (tree ctype, tree declarator, tree decl, validity of the declaration later. */ decl = push_template_decl_real (decl, /*is_friend=*/1); else - decl = check_classfn (ctype, decl, template_member_p); + decl = check_classfn (ctype, decl, + template_member_p + ? current_template_parms + : NULL_TREE); if (template_member_p && decl && TREE_CODE (decl) == FUNCTION_DECL) decl = DECL_TI_TEMPLATE (decl); |

