This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Feb 2014 16:31:39 +0000
- Subject: [Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
- Auto-submitted: auto-generated
- References: <bug-58873-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Issue here is that the argument type gets NULL for function-call of
cp_parser_functional_cast. This invalid type is the result of
cp_parser_simple_type_specifier call.
A fix might be to checking within cp_parser_functional_cast for type == NULL
and set it to error_mark_node if so.
Index: parser.c
===================================================================
--- parser.c (Revision 207686)
+++ parser.c (Arbeitskopie)
@@ -23167,6 +23167,9 @@ cp_parser_functional_cast (cp_parser* parser, tree
tree cast;
bool nonconst_p;
+ if (!type)
+ type = error_mark_node;
+
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
{
maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);