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

From-SVN: r207963

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

index 00982df2e6eb99a3efae90395b3b6b41c8b66e2c..fbcba47d9bf88d086140a07882a176e4a1612381 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 c230d90c63d4de0c4e1527aae2299dee5a63b702..fe8c84df7955b358d6302bd3919cd998c0f55052 100644 (file)
@@ -21419,6 +21419,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);