Now that PR61271 and PR62270 have been fixed, we can enable
-Wlogical-not-parentheses by -Wall.  I think this warning proved
useful.

Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk?

2014-08-26  Marek Polacek  <pola...@redhat.com>

        * doc/invoke.texi: Document that -Wlogical-not-parentheses is enabled
        by -Wall.
c-family/
        * c.opt (Wlogical-not-parentheses): Enable by -Wall.

diff --git gcc/c-family/c.opt gcc/c-family/c.opt
index 210a099..643f256 100644
--- gcc/c-family/c.opt
+++ gcc/c-family/c.opt
@@ -519,7 +519,7 @@ C ObjC C++ ObjC++ Var(warn_logical_op) Init(0) Warning
 Warn when a logical operator is suspiciously always evaluating to true or false
 
 Wlogical-not-parentheses
-C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning
+C ObjC C++ ObjC++ Var(warn_logical_not_paren) Warning LangEnabledBy(C ObjC C++ 
ObjC++,Wall)
 Warn when logical not is used on the left hand side operand of a comparison
 
 Wlong-long
diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index d15d4a9..9864708 100644
--- gcc/doc/invoke.texi
+++ gcc/doc/invoke.texi
@@ -4800,6 +4800,8 @@ parentheses:
 if ((!a) > 1) @{ @dots{} @}
 @end smallexample
 
+This warning is enabled by @option{-Wall}.
+
 @item -Waggregate-return
 @opindex Waggregate-return
 @opindex Wno-aggregate-return

        Marek

Reply via email to