[cfe-commits] [Patch] -Wformat-non-standard: warn about positional arguments (pr12017)
Hans Wennborg
hans at chromium.org
Mon Feb 27 07:09:05 PST 2012
Hi all,
The attached patch makes -Wformat-non-standard warn about the use of
positional arguments (e.g. "%3$d") in format strings. (pr12017)
I'm not super happy about using pragmas to suppress this in
format-strings-fixit.c, so please let me know if there is a better
way.
The problem is that the file is expected to compile cleanly with
-pedantic after the fix-its are applied, which makes sense. An
alternative would be to move the two occurrences of positional
arguments from that file to something like
"format-strings-positional-args-fixit.c" which could be run with
-pedantic -Wno-format-non-standard. But there are already so many
format-strings-*.c files..
Please take a look.
Thanks,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: positional-arguments-warning.diff
Type: application/octet-stream
Size: 5482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120227/3c3ad974/attachment.obj>
More information about the cfe-commits
mailing list