diff options
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1b788310ca3..17b625f668c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3727,8 +3727,10 @@ start_decl (tree declarator,        else  	{  	  tree field = check_classfn (context, decl, -				      processing_template_decl -				      > template_class_depth (context)); +				      (processing_template_decl +				       > template_class_depth (context)) +				      ? current_template_parms +				      : NULL_TREE);  	  if (field && duplicate_decls (decl, field))  	    decl = field;  	} @@ -5691,8 +5693,10 @@ grokfndecl (tree ctype,        tree old_decl;        old_decl = check_classfn (ctype, decl, -				processing_template_decl -				> template_class_depth (ctype)); +				(processing_template_decl +				 > template_class_depth (ctype)) +				? current_template_parms +				: NULL_TREE);        if (old_decl && TREE_CODE (old_decl) == TEMPLATE_DECL)  	/* Because grokfndecl is always supposed to return a | 

