re PR c++/58873 ([c++11] ICE with __underlying_type for broken enum)

PR c++/58873
	* parser.c (cp_parser_functional_cast): Treat NULL_TREE
	valued type argument as error_mark_node.

From-SVN: r207963
This commit is contained in:
Kai Tietz 2014-02-20 17:04:37 +01:00 committed by Kai Tietz
parent ea57539c67
commit 340f0354ef
2 changed files with 7 additions and 0 deletions

View 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.

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