GCC does not warn for this:

int main()
{
  wprintf (L"%s", 5);
}

GCC should try converting the string to single-byte (e.g. to UTF-8, which would
work for any wchar_t encoding in which 0-127 maps to char's encoding) and test
the format string.


-- 
           Summary: -Wformat does not work for wide strings
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308

Reply via email to