This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/63445] [5 Regression] request: make -Wstrict-overflow avoid a class of false positives


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]