[Bug tree-optimization/88835] overly aggressive -Werror=format-overflow for printf since r265648

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Feb 10 00:11:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88835

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |88993

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
The patch I posted for the related pr88993 also relaxes this warning for printf
and fprintf:  https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00224.html

Like in the case of pr88993, the warning is by design and (in my view) makes
sense for sprintf but it's not very useful for the other functions where very
little code worries about exceeding these limits (or even cares about the
functions failing as they can for many other reasons).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993
[Bug 88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc
limits


More information about the Gcc-bugs mailing list