[Bug c++/102932] Wrong implementation of abs with O3

2021-10-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102932 --- Comment #4 from Andrew Pinski --- (In reply to Rajpal Singh from comment #3) > Thanks ! Yes, it's signed integer overflow, is there any way to catch it > statically at compile time ? Not really because there would so many false positives, i

[Bug c++/102932] Wrong implementation of abs with O3

2021-10-25 Thread rajpal.gusain at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102932 --- Comment #3 from Rajpal Singh --- (In reply to Tee KOBAYASHI from comment #1) > Signed integer overflow. You can use -fwrapv. Thanks ! Yes, it's signed integer overflow, is there any way to catch it statically at compile time ?

[Bug c++/102932] Wrong implementation of abs with O3

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

[Bug c++/102932] Wrong implementation of abs with O3

2021-10-25 Thread xtkoba at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102932 Tee KOBAYASHI changed: What|Removed |Added CC||xtkoba at gmail dot com --- Comment #1