Richard Guenther wrote:
The problem in this PR is that code like in the testcase (from OpenOffice) assumes that pointer overflow is defined. As the standard does not talk about wrapping pointer semantics at all (at least I couldn't find anything about that), how should we treat this?
How could pointer arithmetic overflow, the result must be within the same allocated object (or just past it in the array case, and if necessary the compiler must be careful not to allocate an array at the very top end of the address space to avoid any problems -- this is unlikely to happen in practice -- but was an issue on large model 286 programs). At least that's my understanding, it would be surprising if things have changed in this area.
Thanks for any advice, Richard.