[Bug c/52952] Wformat location info is bad (wrong column number)
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 5 18:44:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52952
--- Comment #27 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #25)
> * Cases like:
>
> 1: const str[] = "something %d";
> 2: printf(str);
Note that clang is able to handle this:
manuel@gcc10:~$ clang -Wformat format.c
format.c:4:19: warning: more '%' conversions than data arguments [-Wformat]
__builtin_printf(str);
^~~
format.c:3:33: note: format string is defined here
const char str[] = "something %d";
~^
More information about the Gcc-bugs
mailing list