https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63445

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 7 Oct 2014, manu at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63445
> 
> --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
> > i_15 could be negative and thus j_9 - i_15 could well overflow the input
> > range at the +INF side.  (i_15 is [-INF, j_5(D) + -1])
> 
> Actually, this is a very good point. There is indeed a potential integer
> overflow in the original code. Thus, the warning seems valid.
> 
> Perhaps the warning message could say that the problem is that "j - i" can
> overflow if i is negative.

Sure - but we warn about the comparison against zero which doesn't
behave differently if overflow wraps or is undefined.

Reply via email to