[Bug c/61476] New: GCC is not aware of glibc extensions for format strings
doko at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 11 13:13:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61476
Bug ID: 61476
Summary: GCC is not aware of glibc extensions for format
strings
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
Is this something which can and should be addressed, or should be closed as
won't fix?
$ cat foo.c
#include <errno.h>
#include <stdio.h>
int main()
{
fprintf(stderr, "error %d: %m\n", errno, errno);
return 0;
}
$ gcc -Wall foo.c
foo.c: In function 'main':
foo.c:6:2: warning: too many arguments for format [-Wformat-extra-args]
fprintf(stderr, "error %d: %m\n", errno, errno);
^
fprintf(3):
m (Glibc extension.) Print output of strerror(errno). No argu‐
ment is required.
More information about the Gcc-bugs
mailing list