]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/58873 ([c++11] ICE with __underlying_type for broken enum)
authorKai Tietz <ktietz@redhat.com>
Thu, 20 Feb 2014 16:03:38 +0000 (17:03 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Thu, 20 Feb 2014 16:03:38 +0000 (17:03 +0100)
PR c++/58873
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.

From-SVN: r207962

gcc/cp/ChangeLog
gcc/cp/parser.c

index 6b04f4ccbbdf947846523f9882432936e76b3461..f5a7aeba0e77d06f2ae6b7de530975d97f840831 100644 (file)
@@ -1,5 +1,9 @@
 2014-02-20  Kai Tietz  <ktietz@redhat.com>
 
+       PR c++/58873
+       * parser.c (cp_parser_functional_cast): Treat NULL_TREE
+       valued type argument as error_mark_node.
+
        PR c++/58835
        * semantics.c (finish_fname): Handle error_mark_node.
 
index f6fa168d161fcf27add8fd966db5826926fc328f..b0a7abefce14481b68164d016c7e7a8dbe9dbc55 100644 (file)
@@ -22205,6 +22205,9 @@ cp_parser_functional_cast (cp_parser* parser, tree type)
   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);