[000/nnn] poly_int: representation of runtime offsets and sizes

Jakub Jelinek jakub@redhat.com
Wed Oct 25 10:45:00 GMT 2017


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



More information about the Gcc-patches mailing list