]> 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:02:24 +0000 (17:02 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Thu, 20 Feb 2014 16:02:24 +0000 (17:02 +0100)
PR c++/58873
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.

From-SVN: r207961

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

index 7231155bb32574c40bd39d3976097af5a3de3826..602ab94a8a6a5ce11af38a264dc096fa09295abf 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 98182138e2414c3007cb63a45c2053ac01eb299e..4673f78051a87237c56453c447a9a8fc5f755f47 100644 (file)
@@ -23165,6 +23165,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);