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

            Bug ID: 79049
           Summary: Unknown escape sequence not correctly pointed out
           Product: gcc
           Version: 6.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bobby.prani at gmail dot com
  Target Milestone: ---

GCC does not correctly point out the unknown escape sequence in the string
being printed.

#include <stdio.h>

int main()
{
  fprintf(stderr, "This statement has a \
                   backslash\ which is not correctly pointed out by gcc\n");

  return 0;
}

Output from GCC:

$ gcc test.c -o test
test.c: In function ‘main’:
test.c:5:19: warning: unknown escape sequence: '\040'
   fprintf(stderr, "This statement has a \
                   ^~~~~~~~~~~~~~~~~~~~~~~              

Output from Clang:

$ clang test.c -o test
test.c:6:29: warning: unknown escape sequence '\ ' [-Wunknown-escape-sequence]
                   backslash\ which is not correctly pointed out by gcc\n");
                            ^~

Reply via email to