Commit caa7952a by Marek Polacek Committed by Marek Polacek

re PR c++/84493 (ICE with invalid cast)

	PR c++/84493
	* parser.c (cp_parser_braced_list): Use require_open instead of
	consume_open.

	* g++.dg/parse/error59.C: New test.

From-SVN: r257899
parent c8fe60e3
2018-02-22 Marek Polacek <polacek@redhat.com>
PR c++/84493
* parser.c (cp_parser_braced_list): Use require_open instead of
consume_open.
2018-02-21 Jason Merrill <jason@redhat.com>
PR c++/84454 - ICE with pack expansion in signature.
......
......@@ -21925,7 +21925,7 @@ cp_parser_braced_list (cp_parser* parser, bool* non_constant_p)
/* Consume the `{' token. */
matching_braces braces;
braces.consume_open (parser);
braces.require_open (parser);
/* Create a CONSTRUCTOR to represent the braced-initializer. */
initializer = make_node (CONSTRUCTOR);
/* If it's not a `}', then there is a non-trivial initializer. */
2018-02-22 Marek Polacek <polacek@redhat.com>
PR c++/84493
* g++.dg/parse/error59.C: New test.
2018-02-22 Tom de Vries <tom@codesourcery.com>
* gcc.c-torture/execute/pr82210.c: Require effective target alloca.
......
// PR c++/84493
void foo()
{
(struct {}x){}; // { dg-error "" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment