https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84919
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-16 Ever confirmed|0 |1 --- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> --- [hjl@gnu-bdx-1 tmp]$ cat x.c #include <string.h> #include <stdio.h> char *str_error_r(char *buf, size_t buflen) { snprintf(buf, buflen, "(%p, %zd)", buf, buflen); return buf; } [hjl@gnu-bdx-1 tmp]$ /usr/gcc-8.0.1-x32/bin/gcc -O2 -S -Wall x.c x.c: In function ‘str_error_r’: x.c:5:2: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict] snprintf(buf, buflen, "(%p, %zd)", buf, buflen); ^~~~~~~~ [hjl@gnu-bdx-1 tmp]$