[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Marek Polacek --- Fixed.
[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 --- Comment #2 from Marek Polacek --- Author: mpolacek Date: Thu Feb 22 11:18:37 2018 New Revision: 257899 URL: https://gcc.gnu.org/viewcvs?rev=257899&root=gcc&view=rev Log: PR c++/84493 * parser.c (cp_parser_braced_list): Use require_open instead of consume_open. * g++.dg/parse/error59.C: New test. Added: trunk/gcc/testsuite/g++.dg/parse/error59.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog
[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-21 CC||mpolacek at gcc dot gnu.org Target Milestone|--- |8.0 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed, I think this is the fix: --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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. */