On Wed, May 5, 2021 at 1:32 AM Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > 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).
Makes sense. I suppose walloca might also benefit from SSA - it seems to do range queries which won't work quite well w/o SSA? Thus OK. Thanks, Richard. > Martin