X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=src%2Fexpr.c;h=f8f776004bc246f9c581607d88a757e6bb469d8d;hb=refs%2Ftags%2Fupstream%2F1.3.2;hp=de94563c3bf60c62b07acea106dfe3b2bdbc31b7;hpb=57d4530c4d6814fa25338a00cc65b95938c723b6;p=nesc.git diff --git a/src/expr.c b/src/expr.c index de94563..f8f7760 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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);