diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-03-18 01:07:57 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-03-17 20:07:57 -0500 |
commit | 670960acd3003dcf252400039a5c0926b577d414 (patch) | |
tree | bd56a6aa3da703bc0bce9efcf292c111bdcb485d /gcc | |
parent | 58ba5e8ca7c9a736d0e60d6bbcbb799a254b2417 (diff) | |
download | gcc-670960acd3003dcf252400039a5c0926b577d414.zip gcc-670960acd3003dcf252400039a5c0926b577d414.tar.gz gcc-670960acd3003dcf252400039a5c0926b577d414.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ec69afe..31dcfe4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6cc0aa3..30b4054 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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; |