https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104746
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[12 Regression] False |False positive for |positive for |-Wformat-overflow=2 since |-Wformat-overflow=2 since |r12-7033-g3c9f762ad02f398c |r12-7033-g3c9f762ad02f398c | --- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- None of these "false positives" is due to a bug in the warning code. The warning has been designed and documented to work this way. What triggers more instances of these warnings in GCC 12 is the more accurate range info courtesy of Ranger. Prior to GCC 12, the ranges were less accurate and sometimes unavailable at all, and the warning is designed to avoid triggering in the absence of any range info at all. So I don't consider this a regression.