when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded...
commite1eed38733ed47d44f9d8c7731817c411eaf4141
authorChris Lattner <sabre@nondot.org>
Tue, 14 Jun 2011 06:38:10 +0000 (14 06:38 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Jun 2011 06:38:10 +0000 (14 06:38 +0000)
tree892eac9a394c9c6c0f3f8f4df555b7a855cab903
parent24c38e1ff057ce49c866294bf486444255e18f31
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132983 91177308-0d34-0410-b5e6-96231b3b80d8
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-length-array.cpp