OSDN Git Service

PR c++/58873
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Feb 2014 16:04:37 +0000 (16:04 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Feb 2014 16:04:37 +0000 (16:04 +0000)
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@207963 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 00982df..fbcba47 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 c230d90..fe8c84d 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);