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. A major problem with the Wstrict-overflow warning is
that it is too cryptic. Even looking at the dump files it is not clear
immediately when and why the warning is given.

Another issue is that the location is off, it should point to j - i.

Reply via email to