[Bug tree-optimization/109565] -Wstrict-overflow false positive

2024-08-10 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Commen

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 --- Comment #6 from Andrew Pinski --- Yes it should mention overflow on pointers. Anyways also see https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fwrapv-pointer and right below that with fstrict-overflow .

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread f.heckenbach--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 --- Comment #5 from Frank Heckenbach --- > Agreed, but you asked for it with that option. Nope, I asked for warnings about signed integer overflow. > So you shouldn't have to care about begin(c) < end(c) either, it has to be > true. But you as

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 --- Comment #4 from Jonathan Wakely --- (In reply to Frank Heckenbach from comment #2) > Maybe technically correct, but not useful to the user. Agreed, but you asked for it with that option. > The user's code doesn't involve pointers at all. I

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread f.heckenbach--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 --- Comment #2 from Frank Heckenbach --- Maybe technically correct, but not useful to the user. The user's code doesn't involve pointers at all. It makes two queries about a span object. As the user, I don't even (and shouldn't have to) care wh

[Bug tree-optimization/109565] -Wstrict-overflow false positive

2023-04-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109565 --- Comment #1 from Andrew Pinski --- I suspect the warning is correct. In this case it is p < p + size where size is known to be 2 because of the previous condition. So there is an assumption for pointer overflow not to happen for p+2.