summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-19 11:04:13 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-19 11:04:13 +0000
commit03033af4c1f68904bbecf8aaa95b58d285847c5c (patch)
treebcaf465ab5ba49fd67b08ce44d9d4349c54cc20e /gcc/doc
parent3e682e423ffe1603a4533e89fc766a39c86caeef (diff)
downloadgcc-03033af4c1f68904bbecf8aaa95b58d285847c5c.tar.gz
2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/32061 PR c++/36954 * doc/invoke.texi: Add -Wlogical-op to -Wextra. * common.opt (Wlogical-op): Move from here... * c.opt (Wlogical-op): ... to here. * c-typeck.c (parser_build_binary_op): Update call to warn_logical_operator. * c-opts.c (c_common_post_options): Enable warn_logical_op with extra_warnings. * c-common.c (warn_logical_op): Update. * c-common.h (warn_logical_op): Update declaration. cp/ * call.c (build_new_op): Save the original codes of operands before folding. testsuite/ * gcc.dg/pr32061.c: New. * gcc.dg/Wlogical-op-1.c: Update. * g++.dg/warn/Wlogical-op-1.C: Update. * g++.dg/warn/pr36954.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146344 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3c49a8d81b0..e1dd0e0ad46 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2804,6 +2804,7 @@ name is still supported, but the newer name is more descriptive.)
@gccoptlist{-Wclobbered @gol
-Wempty-body @gol
-Wignored-qualifiers @gol
+-Wlogical-op @gol
-Wmissing-field-initializers @gol
-Wmissing-parameter-type @r{(C only)} @gol
-Wold-style-declaration @r{(C only)} @gol
@@ -3790,7 +3791,8 @@ programmer intended to use @code{strcmp}. This warning is enabled by
@opindex Wno-logical-op
Warn about suspicious uses of logical operators in expressions.
This includes using logical operators in contexts where a
-bit-wise operator is likely to be expected.
+bit-wise operator is likely to be expected. This warning is enabled by
+@option{-Wextra}.
@item -Waggregate-return
@opindex Waggregate-return