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: [email protected]
ReportedBy: [email protected]
#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");
~~^~