[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2021-12-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED

[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2017-08-11 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 --- Comment #4 from joseph at codesourcery dot com --- On Fri, 11 Aug 2017, oss at malat dot biz wrote: > One could solve it by dividing both pointers by the size before the > subtraction, but that would make the operation more expensive. See a

[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2017-08-11 Thread oss at malat dot biz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 --- Comment #3 from Petr Malat --- After reading the related part of the standard (actually, N1570 draft), I'm not so sure about this. The semantics section in 6.5.6 says pointers have to be from the same object and also the result must fit into

[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2017-08-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 --- Comment #2 from Andrew Pinski --- Related to PR 80998.

[Bug target/81801] [PATCH] Difference of two pointers generates signed overflow

2017-08-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81801 Andrew Pinski changed: What|Removed |Added Target||32bit target Component|c