[Bug c/65158] New: printf attribute error reporting assumes single-byte characters
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Feb 21 21:58:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65158
Bug ID: 65158
Summary: printf attribute error reporting assumes single-byte
characters
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tromey at gcc dot gnu.org
printf attribute error reporting assumes that the format character
is a single byte:
warning_at (format_string_loc, OPT_Wformat_,
"unknown conversion type character %qc in format",
format_char);
However I don't think this is necessarily so.
A test case would be a printf string with "%" followed by some
multi-byte UTF-8 character.
format_char is initialized:
format_char = *format_chars;
I suppose this could be changed to get all the bytes of a multi-byte
character; then updating %c handling to follow.
More information about the Gcc-bugs
mailing list