[Bug tree-optimization/124183] Erroneous -Wformat-truncation= warning using -O3
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 20 20:47:37 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124183
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |INVALID
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So -O3 unswitches the loop as there is a condition about null check from
std::string construction. You can see the same warning via `-O2
-funswitch-loops ` too.
More information about the Gcc-bugs
mailing list