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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Testing this:

--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1903,7 +1903,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token,
const uchar *base,
         literal thus breaking the program.
         Try to identify macros with is_macro. A warning is issued.
         The macro name should not start with '_' for this warning. */
-      if ((*cur != '_') && is_macro (pfile, cur))
+      if ((*cur != '_' || cur[1] == '_') && is_macro (pfile, cur))
        {
          /* Raise a warning, but do not consume subsequent tokens.  */
          if (CPP_OPTION (pfile, warn_literal_suffix) &&
!pfile->state.skipping)
@@ -2034,7 +2034,7 @@ lex_string (cpp_reader *pfile, cpp_token *token, const
uchar *base)
         literal thus breaking the program.
         Try to identify macros with is_macro. A warning is issued.
         The macro name should not start with '_' for this warning. */
-      if ((*cur != '_') && is_macro (pfile, cur))
+      if ((*cur != '_' || cur[1] == '_') && is_macro (pfile, cur))
        {
          /* Raise a warning, but do not consume subsequent tokens.  */
          if (CPP_OPTION (pfile, warn_literal_suffix) &&
!pfile->state.skipping)

Reply via email to