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