diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-17 22:43:37 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-17 22:43:37 +0000 |
commit | 9a7c4b43651e307fdea728439b861d78cd275246 (patch) | |
tree | d259806834b4f4ee036d1af0e724187d570c357b /gcc/testsuite/g++.dg/parse | |
parent | e59b9381e3f295094fe173f3e59babee4cb77a68 (diff) | |
download | gcc-9a7c4b43651e307fdea728439b861d78cd275246.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/parse')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/enum3.C | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/enum3.C b/gcc/testsuite/g++.dg/parse/enum3.C new file mode 100644 index 00000000000..11c532c6e91 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/enum3.C @@ -0,0 +1,5 @@ +// PR c++/28261 + +struct A {}; // { dg-error "A" } + +A::A (enum { e }) {} // { dg-error "defined|match" } |