This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61476] New: GCC is not aware of glibc extensions for format strings
- From: "doko at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jun 2014 13:13:29 +0000
- Subject: [Bug c/61476] New: GCC is not aware of glibc extensions for format strings
- Auto-submitted: auto-generated
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.