c++: Fix scan forward over pragma [PR96257]
It turns out that the paren scanning code is used for speculatively searching
to see if we're looking at a compound_literal. So we shouldn't always purge
pragma tokens.
gcc/cp/
* parser.c (cp_lexer_consume_token): Drop PRAGMA_EOL assert.
(cp_parser_skip_to_closing_parenthesis_1): Only pass start token
to pragma skipper if recovering.
(cp_parser_skip_to_pragma_eol): Only purge and change pragma
state when recovering.
gcc/testsuite/
* g++.dg/parse/pr96257.C: New.