summaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-11 22:43:54 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-11 22:43:54 +0000
commit4012a98606090eeb906fd6d4affb6dc079086f2e (patch)
tree393f5424c8fd3418772e0a6d95aebafeafbc5175 /gcc/doc/invoke.texi
parentbaf146020ec28e17d9b8f9e7c886e1e25187249b (diff)
downloadgcc-4012a98606090eeb906fd6d4affb6dc079086f2e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e2fd4c62c18..860a545d95f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -246,7 +246,7 @@ Objective-C and Objective-C++ Dialects}.
-Wno-endif-labels -Werror -Werror=* @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
--Wformat-security -Wformat-y2k @gol
+-Wformat-security -Wformat-signedness -Wformat-y2k @gol
-Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol
-Wignored-qualifiers @gol
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
@@ -3539,7 +3539,7 @@ The C standard specifies that zero-length formats are allowed.
@opindex Wformat=2
Enable @option{-Wformat} plus additional format checks. Currently
equivalent to @option{-Wformat -Wformat-nonliteral -Wformat-security
--Wformat-y2k}.
+-Wformat-signedness -Wformat-y2k}.
@item -Wformat-nonliteral
@opindex Wformat-nonliteral
@@ -3561,6 +3561,12 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but
in future warnings may be added to @option{-Wformat-security} that are not
included in @option{-Wformat-nonliteral}.)
+@item -Wformat-signedness
+@opindex Wformat-signedness
+@opindex Wno-format-signedness
+If @option{-Wformat} is specified, also warn if the format string
+requires an unsigned argument and the argument is signed and vice versa.
+
@item -Wformat-y2k
@opindex Wformat-y2k
@opindex Wno-format-y2k