[Bug c++/79877] -Wstrict-overflow false positive or misunderstanding?
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 5 18:25:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79877
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
The message seems pretty clear to me. gcc has an optimization that turns i-1>i
into false, and is telling you that it applied it (not that there is anything
wrong with your code). In the other code, it doesn't apply that optimization,
so the warning doesn't appear.
Maybe we should just drop the warning if it causes more confusion than it helps
find bugs...
More information about the Gcc-bugs
mailing list