diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 569f646f67538249ba99c08c97e77f6a60281153..19574c3afe4eeed5ce9ae90cf8ee62bbbbade263 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 967be5200a7798dcd4dbe273263e6ce679d7269e..df6fdadf1fb0d9dfa04633fbb72a15c3f8b1722f 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1073,8 +1073,6 @@ c_common_post_options (const char **pfilename)
     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.  */
diff --git a/gcc/c.opt b/gcc/c.opt
index fc34ff57f78b46850ecb52fa917393be363b5e74..da1de00d23ed239182a4284d1bc2a836fecbc977 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -285,7 +285,7 @@ C ObjC C++ ObjC++ Warning
 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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index cb2249e9f7da035bd6d9be350f22989680948655..3dba074ae5c1dc498214216d6df0270e371a56df 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2806,7 +2806,6 @@ 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
@@ -3793,8 +3792,7 @@ 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.  This warning is enabled by
-@option{-Wextra}.
+bit-wise operator is likely to be expected.
 
 @item -Waggregate-return
 @opindex Waggregate-return
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3457351e5f5496730d485d04e94b84968aa12a80..dab10dff1078fbd8c5a2b00ddf15adb6c9919f94 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/gcc/testsuite/gcc.dg/pr40172.c b/gcc/testsuite/gcc.dg/pr40172.c
index aff34764341c72b3aa150e646fe65415a80906f5..a834a8a998e22481cb286b11322c2121c6c86e6e 100644
--- a/gcc/testsuite/gcc.dg/pr40172.c
+++ b/gcc/testsuite/gcc.dg/pr40172.c
@@ -1,6 +1,6 @@
 /* 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;