With no optimization, -Wformat-overflow and -Wformat-truncation runs early to detect a subset of simple bugs. But as it turns out, the pass runs just a tad too early, before SSA. That causes it to miss a class of problems that can easily be detected once code is in SSA form, and I would expect might also cause false positives. The attached change moves the sprintf pass just after pass_build_ssa, similar to other early flow-sensitive warnings (-Wnonnull-compare and -Wuninitialized). Martin