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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-03-01
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, string literal concatenation is implemented in c_parser_string_literal in
the C FE and in cp_parser_string_literal in the C++ FE.
Pragma processing is during translation phase 4 while string literal
concatenation is translation phase 6, plus these pragmas are GCC extension, so
we can do whatever we want, but perhaps handling the string literal
concatenation and erroring out on other arguments after it wouldn't be a bad
idea for GCC 12+.
As the pragmas handle just CPP_STRING, it wouldn't have to handle e.g. mixing
of the various string literal types etc.

Note, currently we diagnose as error
#pragma GCC warning ""
but we should error just on that form and not e.g. on
#pragma GCC warning "" "" "" "foobar"

Reply via email to