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

            Bug ID: 77573
           Summary: bogus wide string literals in diagnostics
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

While experimenting with the test case for bug 77572 I noticed that when
quoting wide string literals in diagnostics G++ prints what looks like
completely bogus sequences:

$ cat z.C && /build/gcc-trunk-git/gcc/xgcc -B /build/gcc-trunk-git/gcc/ -Wall
z.C && ./a.out 
constexpr wchar_t s = L"\x12345678";
z.C:1:23: error: invalid conversion from ‘const wchar_t*’ to ‘wchar_t’
[-fpermissive]
 constexpr wchar_t s = L"\x12345678";
                       ^~~~~~~~~~~~~
z.C:1:23: error: ‘(wchar_t)((const wchar_t*)"xV4\022\000\000\000")’ is not a
constant expression

Reply via email to