re PR c/60194 (-Wformat should also warn when using %d (instead of %u) for unsigned...
authorTobias Burnus <burnus@net-b.de>
Fri, 11 Apr 2014 22:43:54 +0000 (00:43 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 11 Apr 2014 22:43:54 +0000 (00:43 +0200)
commitcbbd2b1c82942411f70b41f0aca6f480a01baef8
tree393f5424c8fd3418772e0a6d95aebafeafbc5175
parentcb41490017822947d5d5c9dbf713af00af306110
re PR c/60194 (-Wformat should also warn when using %d (instead of %u) for unsigned arguments)

2014-04-11  Tobias Burnus  <burnus@net-b.de>

        PR c/60194
gcc/
        * doc/invoke.texi (-Wformat-signedness): Document it.
        (Wformat=2): Mention that this enables -Wformat-signedness.

gcc/c-family/
        * c.opt (Wformat-signedness): Add
        * c-format.c(check_format_types): Use it.

gcc/testsuite/
        * * g++.dg/warn/warn_format_signedness.C: New.
        * gcc.dg/format/warn-signedness.c: New.

From-SVN: r209328
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/c-family/c.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/warn_format_signedness.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/warn-signedness.c [new file with mode: 0644]