On Wed, Oct 25, 2017 at 12:19:37PM +0200, Richard Biener wrote: > Hum. But then we still warn for must_eq_p (x, 1), no? > > So why does > > int f (unsigned int x) > { > return x != 0; > } > > not warn? Probably because of promotion of the arg.
Because then one comparison operand is positive constant smaller than the signed maximum. We warn when both comparison operands are variable and one is signed and the other is unsigned. Jakub