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
This commit is contained in:
Mark Mitchell 1997-12-18 19:26:14 +00:00 committed by Jason Merrill
parent 337e2b6923
commit 6ba4439c3b
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
* 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.

View File

@ -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)))