From 6ba4439c3b168c79fb4a9eed9e6491f39752b57d Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 18 Dec 1997 19:26:14 +0000 Subject: [PATCH] pt.c (coerce_template_parms): Make sure to digest_init if possible. * pt.c (coerce_template_parms): Make sure to digest_init if possible. From-SVN: r17138 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/pt.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 18e77ea58cb..8899897a0f6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ Thu Dec 18 14:51:50 1997 Mark Mitchell + * pt.c (coerce_template_parms): Make sure to digest_init if + possible. + * decl.c (duplicate_decls): Make the newdecl virtual if the olddecl was, just as is done with other attributes of olddecl. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c1cfa9253f5..9476d1286f8 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1079,7 +1079,10 @@ coerce_template_parms (parms, arglist, in_decl) if (processing_template_decl) val = maybe_fold_nontype_arg (arg); else - val = digest_init (t, arg, (tree *) 0); + val = arg; + + if (!uses_template_parms (val) && !uses_template_parms (t)) + val = digest_init (t, val, (tree *) 0); if (val == error_mark_node || (processing_template_decl && uses_template_parms (val))) -- 2.30.2