This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71756] [5/6/7 Regression] internal compiler error: in ~saved_token_sentinel, at cp/parser.c:1228


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, ...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]