[Bug c++/96328] [11 Regression] Single keyword "friend" makes GCC ICE in cp_lexer_previous_token, at cp/parser.c:769 since r11-891-g1dc83b460653c29f
mark at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 27 09:26:36 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96328
--- Comment #4 from Mark Wielaard <mark at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 48930 [details]
> gcc11-pr96328.patch
>
> I wrote this for it (the first hunk is similar).
Yours is nicer because it fixes just the specific part that fails (and it
includes an actual test case).
I tried to fix any use of prev_token in cp_parser_error_1. But I cannot tell if
the one under missing_token_desc != RT_NONE can ever trigger. It was just the
most safe fix I could come up with.
More information about the Gcc-bugs
mailing list