Commit 670960ac by Jason Merrill Committed by Jason Merrill

pt.c (check_explicit_specialization): Complain about default args in explicit specialization.

	* pt.c (check_explicit_specialization): Complain about default args
	in explicit specialization.

From-SVN: r18652
parent 58ba5e8c
Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (check_explicit_specialization): Complain about default args
in explicit specialization.
* parse.y (nomods_initdcl0): Also call cp_finish_decl for a
constructor_declarator.
......
......@@ -839,6 +839,18 @@ check_explicit_specialization (declarator, decl, template_count, flags)
}
}
if (specialization || member_specialization)
{
tree t = TYPE_ARG_TYPES (TREE_TYPE (decl));
for (; t; t = TREE_CHAIN (t))
if (TREE_PURPOSE (t))
{
cp_pedwarn
("default argument specified in explicit specialization");
break;
}
}
if (specialization || member_specialization || explicit_instantiation)
{
tree tmpl = NULL_TREE;
......
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