[Bug c/109979] -Wformat-overflow false positive for %d and non-basic expression

2023-05-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109979 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic Summary|[12 Regre

[Bug c/109979] -Wformat-overflow false positive for %d and non-basic expression

2023-05-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109979 --- Comment #3 from Andrew Pinski --- Note there is no warning if you use -fwrapv which is what I expected as the range of e-1 becomes the whole range because overflow becomes defined as wrapping

[Bug c/109979] -Wformat-overflow false positive for %d and non-basic expression

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

[Bug c/109979] -Wformat-overflow false positive for %d and non-basic expression

2023-05-26 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109979 --- Comment #5 from Vincent Lefèvre --- (In reply to Andrew Pinski from comment #1) > The warning should happen for both ... OK (as the documentation says "[...] that might overflow the destination buffer). (In reply to Richard Biener from com