https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77690

--- Comment #2 from nsz at gcc dot gnu.org ---
(In reply to Martin Sebor from comment #1)
>   sprintf(foo, "zz%.4s", s.buf);
> 
> Please let me know if this isn't sufficient to resolve the problem report.

in my case truncation is fatal error so using precision is not useful (other
than suppressing the warning) and has a runtime cost (extra arg passing for
%.*s).

Reply via email to