On Mon, Jun 13, 2011 at 11:38 PM, Chris Lattner <[email protected]> wrote: > Author: lattner > Date: Tue Jun 14 01:38:10 2011 > New Revision: 132983 > > URL: http://llvm.org/viewvc/llvm-project?rev=132983&view=rev > Log: > 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 > > Modified: > cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td > cfe/trunk/lib/Sema/SemaType.cpp > cfe/trunk/test/Sema/const-eval.c > cfe/trunk/test/Sema/i-c-e.c > cfe/trunk/test/Sema/struct-decl.c > cfe/trunk/test/Sema/typedef-variable-type.c > cfe/trunk/test/Sema/vla.c > cfe/trunk/test/SemaCXX/c99-variable-length-array.cpp
This should probably get added to http://clang.llvm.org/docs/UsersManual.html#c_modes . -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
