[cfe-commits] r132983 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp test/Sema/const-eval.c test/Sema/i-c-e.c test/Sema/struct-decl.c test/Sema/typedef-variable-type.c test/Sema/vla.c test/SemaCXX/c99-variable-l
Chris Lattner
clattner at apple.com
Tue Jun 14 17:35:09 PDT 2011
On Jun 14, 2011, at 4:04 PM, Eli Friedman wrote:
>>>> when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant
>>>> as constant size arrays. This has slightly different semantics in some insane cases, but allows
>>>> us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other
>>>> modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code
>>>
>>> http://smooshlab.apple.com:8013/builders/gccTestSuite_clang-x86_64-darwin10-RA__c
>>
>> Interesting, one instance (array-5.c) is failing exactly because of what we're trying to do here. Passing -std=c99 fixes the failure. Does anyone know how to do this to the test?
>
> /* { dg-options { -std=c99 } } */
Thanks! I fixed the two failures I introduced, but there are still some failures remaining. These happened before my commit, an example run is here:
http://smooshlab.apple.com:8013/builders/gccTestSuite_clang-x86_64-darwin10-RA__c/builds/805/steps/test-gcc-4_2-testsuite-gcc/logs/tests.FAIL
Buildbot pins the blame on a small range of commits: r132973 (pcc)'s patch is the most likely candidate.
-Chris
More information about the cfe-commits
mailing list