[cfe-commits] r135075 - in /cfe/trunk: lib/Analysis/FormatString.cpp test/Sema/format-strings-i386.c
Sean Hunt
rideau3 at gmail.com
Thu Jul 14 00:30:29 PDT 2011
On 11-07-13 11:50 PM, Ted Kremenek wrote:
> Thanks. I've reapplied in r135134 with a hopeful fix.
>
> On Jul 13, 2011, at 10:20 PM, NAKAMURA Takumi wrote:
>
>>> Author: kremenek
>>> Date: Wed Jul 13 15:20:58 2011
>>> New Revision: 135075
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=135075&view=rev
>>> Log:
>>> format string checking: long and int have the same widths on 32-bit, so we shouldn't warn about using
>>> an "int" format specifier with a "long" type in 32-bit.
I have to question the wisdom of this approach at all. Warnings should
help to write good code, even if it may happen to work in a few cases.
When int and long are the same size, then we have incorrect code that
happens to work. I think we should leave this warning on and encourage
users to make their code correct so that it doesn't break when they move
to an LP64 environment.
Sean
More information about the cfe-commits
mailing list