[Bug tree-optimization/100197] g++ emits spurious Wstring-compare warnings on strcmp()

2022-07-28 Thread rajpal.gusain at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100197 --- Comment #2 from Rajpal Singh --- I also get similar error when one of the argument string is constant and I believe it's related. I tried it with g++ 11.2 'int strncmp(const char*, const char*, size_t)' of strings of length 1 and 6 and boun

[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] New: 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 Bug ID: 102932 Summary: Wrong implementation of abs with O3 Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++