This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71756] [5/6/7 Regression] internal compiler error: in ~saved_token_sentinel, at cp/parser.c:1228
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Jul 2016 16:16:31 +0000
- Subject: [Bug c++/71756] [5/6/7 Regression] internal compiler error: in ~saved_token_sentinel, at cp/parser.c:1228
- Auto-submitted: auto-generated
- References: <bug-71756-4@http.gcc.gnu.org/bugzilla/>
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, ...