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

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
In our case the issue is slightly different, the problem is in
cp_parser_initializer_list, here:

      cp_parser_parse_tentatively (parser);
      cp_lexer_consume_token (parser->lexer);
      designator = cp_parser_constant_expression (parser, true, &non_const);
      cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE);
      cp_parser_require (parser, CPP_EQ, RT_EQ);
      if (!cp_parser_parse_definitely (parser))
        designator = NULL_TREE;
      else if (non_const)
        require_potential_rvalue_constant_expression (designator);

where cp_parser_constant_expression is tentatively called. I think it can be
solved by looking forward for the '=', similarly to other GNU extensions, for
example compound literals.

Reply via email to