[Bug tree-optimization/81388] Incorrect code generation with -O1 -fno-strict-overflow
krister.walfridsson at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 12 08:26:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81388
krister.walfridsson at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |krister.walfridsson at gmail dot c
| |om
--- Comment #5 from krister.walfridsson at gmail dot com ---
Comment #1 says that "-fno-strict-overflow Does not effect Pointers", but the
manual says for -fstrict-overflow:
"This option also allows the compiler to assume strict pointer semantics: given
a pointer to an object, if adding an offset to that pointer does not produce a
pointer to the same object, the addition is undefined. This permits the
compiler to conclude that p + u > p is always true for a pointer p and unsigned
integer u. This assumption is only valid because pointer wraparound is
undefined, as the expression is false if p + u overflows using twos complement
arithmetic."
At least I read this as -fno-strict-overflow permit pointer overflow too. Is
that incorrect? If so, then I think the manual should be corrected/clarified...
More information about the Gcc-bugs
mailing list