]> oss.titaniummirror.com Git - nesc.git/blobdiff - src/expr.c
Merge branch 'upstream' (nesc-1.3.2)
[nesc.git] / src / expr.c
index de94563c3bf60c62b07acea106dfe3b2bdbc31b7..f8f776004bc246f9c581607d88a757e6bb469d8d 100644 (file)
@@ -1141,12 +1141,13 @@ expression make_binary(location loc, int binop, expression e1, expression e2)
          if (unsafe_comparison(e1) || unsafe_comparison(e2))
            warning("suggest parentheses around comparison in operand of &");
        }
-    }
 
-  /* Similarly, check for cases like 1<=i<=10 that are probably errors.  */
-  if (unsafe_comparison(result) && extra_warnings
-      && (unsafe_comparison(e1) || unsafe_comparison(e2)))
-    warning("comparisons like X<=Y<=Z do not have their mathematical meaning");
+      /* Similarly, check for cases like 1<=i<=10 that are probably errors.  */
+      /* This was under extra_warnings in 3.4.x, but under warn_parentheses in 4.? */
+      if (unsafe_comparison(result) 
+         && (unsafe_comparison(e1) || unsafe_comparison(e2)))
+       warning("comparisons like X<=Y<=Z do not have their mathematical meaning");
+    }
 
 #if 0
   unsigned_conversion_warning (result, arg1);