[Bug c/52952] New: Wformat location info is bad (wrong column number)
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 21:22:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952
Bug #: 52952
Summary: Wformat location info is bad (wrong column number)
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
#include <stdio.h>
void f() {
printf("%.*d");
}
$ gcc-4.8 -fsyntax-only -Wformat format-strings.c
format-strings.c: In function 'f':
format-strings.c:3:4: warning: field precision specifier '.*' expects a
matching 'int' argument [-Wformat]
printf("%.*d");
^
format-strings.c:3:4: warning: format '%d' expects a matching 'int' argument
[-Wformat]
printf("%.*d");
^
$ clang-3.1 -fsyntax-only format-strings.c
format-strings.c:3:14: warning: '.*' specified field precision is missing a
matching 'int' argument
printf("%.*d");
~~^~
More information about the Gcc-bugs
mailing list