Commit a15ec2b8 authored by jason's avatar jason
Browse files

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

	in explicit specialization.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18652 138bc75d-0d04-0410-961f-82ee72b054a4
parent b52ee496
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