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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 35157
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35157
Untested draft patch

I'd say the C++ parser change is ok, but the C parser change is not, I think
c_parser_skip_until_found will not do
  gcc_assert (parser->in_pragma);
  parser->in_pragma = false;
at the beginning and
  parser->error = false;
at the end.
So, perhaps add (optional?) bool argument to c_parser_skip_to_pragma_eol
whether
it should report the error if not already at CPP_PRAGMA_EOL (the default case),
or whether it should use c_parser_next_token_is/c_parser_consume_token instead?

Reply via email to