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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52607
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52607&action=edit
gcc12-pr104623.patch

The problem is that the function purges the tokens, from the token after
CPP_PRAGMA until CPP_PRAGMA_EOL (the latter inclusive).  But CPP_PRAGMA is not
purged.  So, next time we tentatively parse it we ICE because CPP_PRAGMA isn't
followed by CPP_PRAGMA_EOL anymore (because purged tokens are ignored).
I have tried various things, purging also the pragma_tok token or changing
second argument of cp_parser_skip_to_pragma_eol to NULL in
cp_parser_skip_to_end_of_statement and
cp_parser_skip_to_end_of_block_or_statement but both regressed various
testcases.
This at least in quick check-g++ testing didn't regress anything.
  • [Bug c++/104623] [11/12 Regress... jakub at gcc dot gnu.org via Gcc-bugs

Reply via email to