When compiled in C mode, the following test emits warnings that point at each of the problem directives: $ cat xyz.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -S -Wformat xyz.c void f (void) { __builtin_printf ("%s%s", 0, 0); } xyz.c: In function ‘f’: xyz.c:3:23: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] __builtin_printf ("%s%s", 0, 0); ^ xyz.c:3:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] __builtin_printf ("%s%s", 0, 0); ^ However, when compiled in C++ mode, the column information is wrong: $ cat xyz.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -S -Wformat -xc++ xyz.c void f (void) { __builtin_printf ("%s%s", 0, 0); } xyz.c: In function ‘void f()’: xyz.c:3:33: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘int’ [-Wformat=] __builtin_printf ("%s%s", 0, 0); ^ xyz.c:3:33: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘int’ [-Wformat=] The same problem occurs with other directives. I found a long discussion of some of the issues in bug 52952 but based on the patches referenced from there it looks like they have been resolved (as least for C).
Bug 56856 already tracks this problem. *** This bug has been marked as a duplicate of bug 56856 ***