PR c/40172
gcc/
* c.opt (Wlogical-op): Disabled by default.
* c-opt (c_common_post_options): Do not enable Wlogical-op with
Wextra.
* doc/invoke.texi (Wlogical-op): Likewise.
testsuite/
* gcc.dg/pr40172.c: Add -Wlogical-op to dg-options.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147717
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-05-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/40172
+ * c.opt (Wlogical-op): Disabled by default.
+ * c-opt (c_common_post_options): Do not enable Wlogical-op with
+ Wextra.
+ * doc/invoke.texi (Wlogical-op): Likewise.
+
2009-05-19 Eric Botcazou <ebotcazou@adacore.com>
* tree-scalar-evolution.c (follow_ssa_edge_expr) <NOP_EXPR>: Turn
warn_override_init = extra_warnings;
if (warn_ignored_qualifiers == -1)
warn_ignored_qualifiers = extra_warnings;
- if (warn_logical_op == -1)
- warn_logical_op = extra_warnings;
/* -Wpointer-sign is disabled by default, but it is enabled if any
of -Wall or -pedantic are given. */
Warn about PCH files that are found but not used
Wlogical-op
-C ObjC C++ ObjC++ Var(warn_logical_op) Init(-1) Warning
+C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
Warn when a logical operator is suspiciously always evaluating to true or false
Wlong-long
@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
@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. This warning is enabled by
-@option{-Wextra}.
+bit-wise operator is likely to be expected.
@item -Waggregate-return
@opindex Waggregate-return
+2009-05-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/40172
+ * gcc.dg/pr40172.c: Add -Wlogical-op to dg-options.
+
2009-05-19 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization6.ad[sb]: New test.
/* PR middle-end/40172 */
/* { dg-do compile } */
-/* { dg-options "-Wall -W -Werror" } */
+/* { dg-options "-Wall -W -Werror -Wlogical-op" } */
struct rtx_def;
typedef struct rtx_def *rtx;