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);

Reply via email to