diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 09:39:51 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 09:39:51 +0000 |
commit | ccc5f70da5eb810f09be63d4e92b57bb38121050 (patch) | |
tree | c4c894ea7966d75acf118ccda3d7a986916f927d /gcc/cp | |
parent | 1285d852e35dc19cad7a0c2433c41e882d25dfc3 (diff) | |
download | gcc-ccc5f70da5eb810f09be63d4e92b57bb38121050.tar.gz |
gcc/cp/ChangeLog:
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* parser.c (cp_parser_enumerator_definition): Make sure the
initializer of the enumerator doesn't contain any bare parameter pack.
gcc/testsuite/ChangeLog
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* g++.dg/cpp0x/variadic-crash2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145717 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 264fea46725..22d1ced46dd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2009-04-08 Dodji Seketeli <dodji@redhat.com> + + PR c++/39637 + * parser.c (cp_parser_enumerator_definition): Make sure the + initializer of the enumerator doesn't contain any bare parameter pack. + 2009-04-07 Jason Merrill <jason@redhat.com> PR c++/34691 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 28f47c8f402..18d62cc49ca 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12011,6 +12011,11 @@ cp_parser_enumerator_definition (cp_parser* parser, tree type) else value = NULL_TREE; + /* If we are processing a template, make sure the initializer of the + enumerator doesn't contain any bare template parameter pack. */ + if (check_for_bare_parameter_packs (value)) + value = error_mark_node; + /* Create the enumerator. */ build_enumerator (identifier, value, type); } |