[cfe-commits] r146326 - in /cfe/trunk: include/clang/Analysis/Analyses/FormatString.h lib/Analysis/ScanfFormatString.cpp lib/Sema/SemaChecking.cpp test/Analysis/taint-generic.c test/Analysis/taint-tester.c test/Sema/format-strings-fixit.c test/Se

Joerg Sonnenberger joerg at britannica.bec.de
Tue Jan 3 11:24:08 PST 2012


On Tue, Dec 13, 2011 at 12:13:40PM +0000, Hans Wennborg wrote:
> On Tue, Dec 13, 2011 at 6:47 AM, Ted Kremenek <kremenek at apple.com> wrote:
> > It is also possible that those tests need to be modified if Clang's behavior
> > ends up being more desirable than what is reflected in those tests.  I
> > haven't looked at them, so I don't know off hand.
> 
> The failing tests use the 'a' length modifier, a GNU extension
> available for C90 which can be used with strings and scanlists, that I
> didn't know about before.

I've just run into yet another case where a GNU extension leaked into
the default format string parsing. %m is allowed by default,
even though this seems to be a glibc-only extension. Which brings up the
question, why this extensions are even allowed by default with
-std=gnu99 or -std=gnu90. They are not only GNU compiler extensions,
more importantly, they are libc extensions and somewhat dangerous to use
in portable code. Can we please move them under a separate option? For
Linux, the option could be disabled by default...

Joerg



More information about the cfe-commits mailing list