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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
In
        if (!cp_parser_error_occurred (parser)
            && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)
            && cp_parser_start_tentative_firewall (parser))
          start = token;
        cp_parser_lambda_body (parser, lambda_expr);
cp_parser_error_occurred (parser)
is true (because cp_parser_identifier called during
cp_parser_lambda_introducer:
9886          capture_token = cp_lexer_peek_token (parser->lexer);
9887          capture_id = cp_parser_identifier (parser);
failed cp_parser_require), which means the tentative firewall is not added, but
the lambda body is parsed.  Dunno if the tentative firewall just shouldn't be
added in that case unconditionally, or if instead the lambda body shouldn't be
parsed and we should return earlier, ...

Reply via email to