https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81586
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-07-27 CC| |marxin at gcc dot gnu.org, | |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- Confirmed, following patch will be needed: diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 644cf7e33b1..72ec10a77b9 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -2500,7 +2500,7 @@ maybe_warn (substring_loc &dirloc, source_range *pargrange, : G_("%<%.*s%> directive writing %wu bytes " "into a region of size %wu"))); return fmtwarn (dirloc, pargrange, NULL, - info.warnopt (), fmtstr, dir.len, + info.warnopt (), fmtstr, MIN (dir.len, 31), target_to_host (hostdir, sizeof hostdir, dir.beg), res.min, navail); } I'm not sure about the constant (maybe 32) and there are multiple invocations of the fmtwarn function. Leaving to Martin.