[5.0] PR60194 [c-family] add -Wformat-signedness to warn about %d/%u signedness mismatch

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Tue Feb 18 16:18:00 GMT 2014


This patch adds a warning to -Wformat=2, which can also be used as
-Wformat -Wformat-signedness and which warns when the signedness
of the argument doesn't match the one of %x/%u/%d/%i/...

That was motivated by a check of cppcheck, which found some issues
in a bigger code.

Bootstrapped and regtested on x86-64-gnu-linux.
OK when Stage 1 opens again?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wformat-signedness.diff
Type: text/x-diff
Size: 4767 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140218/78327839/attachment.bin>


More information about the Gcc-patches mailing list