https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=72783 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- This looks like a near dupe of bug 72783 (or vice versa), though not exactly the same. That one asks for hardening which will be harder. Warning should be a lot easier. The file where -Wformat-overflow is implemented for sprintf et al. is gimple-ssa-sprintf.c. -Wformat alone is handled in c-family/c-format.c but that's not a good place to do buffer overflow checking (it runs too early to have knowledge of object sizes in all but the most trivial cases).