diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-29 08:28:06 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-29 08:28:06 +0000 |
commit | 934e3486a34d6b75a7ee6ad7f1e4955b281cd790 (patch) | |
tree | 9b37fb80dd3b6b97223446dfd75d0c044727ade9 /gcc/cp/decl.c | |
parent | 4d08644ea7c637356dd47d7b92e5f696481ae657 (diff) | |
download | gcc-934e3486a34d6b75a7ee6ad7f1e4955b281cd790.tar.gz |
PR c++/38637
* decl.c (start_enum): If enumtype is error_mark_node, exit early.
* g++.dg/cpp0x/enum2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142946 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index efc7e2eb8a3..76482d2e371 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10891,6 +10891,9 @@ start_enum (tree name, tree underlying_type, bool scoped_enum_p) enumtype = pushtag (name, enumtype, /*tag_scope=*/ts_current); } + if (enumtype == error_mark_node) + return enumtype; + if (scoped_enum_p) { SET_SCOPED_ENUM_P (enumtype, 1); |