re PR c++/28261 (ICE with enum in constructor definition)
authorMark Mitchell <mark@codesourcery.com>
Tue, 17 Oct 2006 22:43:37 +0000 (22:43 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 17 Oct 2006 22:43:37 +0000 (22:43 +0000)
commitd19b84e94b3a0b93c02128f4a9f34281a70ebf41
treed259806834b4f4ee036d1af0e724187d570c357b
parentc7b0e0273ea01ccc3a8b8065944f89b6d619e787
re PR c++/28261 (ICE with enum in constructor definition)

PR c++/28261
* parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
function.
(cp_parser_constructor_declarator_p): Use it.
(cp_parser_check_type_definition): Return a value indicating
whether or not the definition is valid.
(cp_parser_enum_specifier): Skip invalid enum definitions.
PR c++/28261
* g++.dg/parse/enum3.C: New test.

From-SVN: r117835
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/enum3.C [new file with mode: 0644]