[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

Peter Collingbourne peter at pcc.me.uk
Wed Jun 15 10:09:01 PDT 2011


On Tue, Jun 14, 2011 at 05:35:09PM -0700, Chris Lattner wrote:
> 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.

r132973 was a header file move, so I would be very surprised if this
were the culprit.

git bisect reveals that the first failing commit is r132957, and a
test revert of r132957 against svn trunk indeed fixes this particular
failure.

Thanks,
-- 
Peter



More information about the cfe-commits mailing list