diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-18 01:07:57 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-18 01:07:57 +0000 |
| commit | a15ec2b83666aac2ba3130738abb1249fa4c91b3 (patch) | |
| tree | bd56a6aa3da703bc0bce9efcf292c111bdcb485d | |
| parent | b52ee496e7b85e7e3ae8987d737374763cf809bf (diff) | |
| download | ppe42-gcc-a15ec2b83666aac2ba3130738abb1249fa4c91b3.tar.gz ppe42-gcc-a15ec2b83666aac2ba3130738abb1249fa4c91b3.zip | |
* 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
| -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 ec69afe5f11..31dcfe42b54 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 6cc0aa30083..30b4054d655 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; |

