[cfe-commits] r140777 - in /cfe/trunk: lib/Sema/SemaChecking.cpp test/Sema/format-strings.c
Douglas Gregor
dgregor at apple.com
Thu Sep 29 10:30:18 PDT 2011
On Sep 29, 2011, at 9:48 AM, jahanian wrote:
>
> On Sep 29, 2011, at 9:40 AM, Jakob Stoklund Olesen wrote:
>
>>
>> On Sep 28, 2011, at 10:52 PM, Ted Kremenek wrote:
>>
>>> Author: kremenek
>>> Date: Thu Sep 29 00:52:16 2011
>>> New Revision: 140777
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=140777&view=rev
>>> Log:
>>> Do not warn about empty format strings when there are no data arguments. Fixes <rdar://problem/9473155>.
>>>
>>> Modified:
>>> cfe/trunk/lib/Sema/SemaChecking.cpp
>>> cfe/trunk/test/Sema/format-strings.c
>>
>> Hi Ted,
>>
>> This probably broke gcc-4_2-testsuite/src/gcc.dg/format/c90-printf-1.c and c90-scanf-1.c
>>
>> The test last passed at r140726 and started failing at r140780, so it could also be Doug or Daniel.
>
> This warning has disappeared in both tests.
>
> c90-printf-1.c:226:11: warning: format string is empty [-Wformat-zero-length]
> printf (""); /* { dg-warning "zero-length" "warning for empty format" } */
> ^~
… which was intentional. The commit log says:
Do not warn about empty format strings when there are no data arguments.
the tests in the GCC test suite need to be updated.
- Doug
More information about the cfe-commits
mailing list