I think it might be worth adding -Wlogical-op to the standard warning
options (for supported compilers, determined by configure test).
`-Wlogical-op' Warn about suspicious uses of logical operators in expressions. This includes using logical
operatorsin contexts where a bit-wise operator is likely to be expected.
In addition to what it says there, it appears to warn about illogical
combinations of < and >. I have been using it locally for a while
without problems. We have already found a couple of bugs this way.