Commit 9f46fa10 by Jason Merrill Committed by Jason Merrill

pt.c (push_inline_template_parms_recursive): Don't recreate the CONST_DECL.

	* pt.c (push_inline_template_parms_recursive): Don't recreate the
	CONST_DECL.

From-SVN: r229856
parent 75d86b7d
2015-11-06 Jason Merrill <jason@redhat.com>
* pt.c (push_inline_template_parms_recursive): Don't recreate the
CONST_DECL.
2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* init.c (warn_placement_new_too_small): Use %wu format * init.c (warn_placement_new_too_small): Use %wu format
......
...@@ -441,21 +441,8 @@ push_inline_template_parms_recursive (tree parmlist, int levels) ...@@ -441,21 +441,8 @@ push_inline_template_parms_recursive (tree parmlist, int levels)
break; break;
case PARM_DECL: case PARM_DECL:
{ /* Push the CONST_DECL. */
/* Make a CONST_DECL as is done in process_template_parm. pushdecl (TEMPLATE_PARM_DECL (DECL_INITIAL (parm)));
It is ugly that we recreate this here; the original
version built in process_template_parm is no longer
available. */
tree decl = build_decl (DECL_SOURCE_LOCATION (parm),
CONST_DECL, DECL_NAME (parm),
TREE_TYPE (parm));
DECL_ARTIFICIAL (decl) = 1;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
DECL_INITIAL (decl) = DECL_INITIAL (parm);
SET_DECL_TEMPLATE_PARM_P (decl);
pushdecl (decl);
}
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment