[Bug tree-optimization/104746] False positive for -Wformat-overflow=2 since r12-7033-g3c9f762ad02f398c
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 14 16:49:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104746
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #12 from Martin Sebor <msebor at gcc dot gnu.org> ---
The documented purpose of -Wformat-overflow=2 is to point out potential
problems, including those where an argument is not known to be sufficiently
constrained. (Level 1 behaves close to what you expect.) Level 2 is not
enabled in -Wall or -Wextra and must be explicitly enabled. Different designe
choices are of course possible but since some projects are using it as is it's
useful as designed. This is not a bug.
More information about the Gcc-bugs
mailing list