https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77720
Dmitry G. Dyachenko changed:
What|Removed |Added
Status|RESOLVED|CLOSED
--- Comment #2 from Dmitry G. Dyachenko ---
r240462 PASS : print diagnostique one time
$ gcc -Wall -c -O3 x.c
x.c: In function ‘bar’:
x.c:15:21: warning: ‘%3u’ directive output may be truncated writing between 3
and 10 bytes into a region of size 4 [-Wformat-length=]
snprintf(p, 4, "%3u", k);
^~~
x.c:15:20: note: directive argument in the range [0u, 4294967295u]
snprintf(p, 4, "%3u", k);
^
x.c:15:5: note: format output between 4 and 11 bytes into a destination of size
4
snprintf(p, 4, "%3u", k);
^~~~