-Wformat: fix nonsensical "wide character" message (PR c/84258)
commit35ebe9dacc429316e603c4d7ccfcde599388ee98
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 May 2018 18:51:15 +0000 (1 18:51 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 May 2018 18:51:15 +0000 (1 18:51 +0000)
tree6a4fbd7ff8617e1040301cc5459a55a9fbb6c517
parenta4d11b838799ef247743e9a23b00377073d59775
-Wformat: fix nonsensical "wide character" message (PR c/84258)

gcc/c-family/ChangeLog:
PR c/84258
* c-format.c (struct format_check_results): Add field
"number_non_char".
(check_format_info): Initialize it, and warn if encountered.
(check_format_arg): Distinguish between wide char and
everything else when detecting arrays of non-char.

gcc/testsuite/ChangeLog:
PR c/84258
* c-c++-common/Wformat-pr84258.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259807 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wformat-pr84258.c [new file with mode: 0644]