[Bug c/61240] [6/7/8 Regression] Incorrect warning "integer overflow in expression" on pointer-pointer subtraction

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 17 16:38:00 GMT 2018


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

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 43162
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43162&action=edit
gcc8-pr61240.patch

The C FE doesn't do this optimization anymore, but c_fully_fold does because
the generic folding code folds it.  This should fix that.  Can't reproduce
warning with C++.


More information about the Gcc-bugs mailing list