On Mon, Jan 02, 2017 at 04:54:57PM -0700, Martin Sebor wrote:
Looks good to me, thanks! Just a couple of suggestions:
Here is updated patch with those added comments (and adjusted for the
current trunk). Ok for trunk?
2017-01-10 Jakub Jelinek <jakub@redhat.com>
* gimple-ssa-sprintf.c (try_substitute_return_value): Remove
info.nowrite calls with no lhs that can't throw. Return bool
whether gsi_remove has been called or not.
(pass_sprintf_length::handle_gimple_call): Return bool whether
try_substitute_return_value called gsi_remove. Formatting fix.
(pass_sprintf_length::execute): Don't use gsi_remove if
handle_gimple_call returned true.
* gcc.dg/tree-ssa/builtin-snprintf-1.c: New test.