[Bug c++/84493] [8 Regression] ICE with invalid cast

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 21 08:18:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493

Marek Polacek <mpolacek at gcc dot gnu.org> 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 <mpolacek at gcc dot gnu.org> ---
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.  */


More information about the Gcc-bugs mailing list