[cfe-commits] [Patch] -Wformat-non-standard: warn about positional arguments (pr12017)

Hans Wennborg hans at chromium.org
Thu Mar 1 07:08:11 PST 2012


On Tue, Feb 28, 2012 at 11:03, Hans Wennborg <hans at chromium.org> wrote:
> On Mon, Feb 27, 2012 at 20:00, Ted Kremenek <kremenek at apple.com> wrote:
>> For me the goal of the warning is to warn about non-portable code, not annoy
>> people.  Format specifiers and format string extensions covered by POSIX are
>> by definition portable on POSIX-compliant systems.  So I raise the question
>> of whether or not we should warn about these at all?
>
> I agree that a good warning about non-portable code, that could be
> turned on by default or as part of -Wall, would be the ideal.
>
> However, we're not there yet. In the meantime, I think having a
> warning under -pedantic that warns about non-ISO C format strings
> makes sense. I agree that it would be extremely annoying to warn about
> POSIX extensions by default, but under -pedantic I think users would
> expect to get warnings about these, just as with GCC.
>
> Maybe the wording of the warnings and the name of the flag could be
> changed to make this intention more clear. I agree that just saying
> "non-standard" is a bit vague in the light of some of these features
> actually being standardized under POSIX.
>
>  - Hans

Ping. How do we proceed with this?




More information about the cfe-commits mailing list