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
This commit is contained in:
parent
c8fe60e372
commit
caa7952a43
@ -1,3 +1,9 @@
|
||||
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. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
6
gcc/testsuite/g++.dg/parse/error59.C
Normal file
6
gcc/testsuite/g++.dg/parse/error59.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/84493
|
||||
|
||||
void foo()
|
||||
{
|
||||
(struct {}x){}; // { dg-error "" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user