[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
Eli Friedman
eli.friedman at gmail.com
Tue Jun 14 17:29:38 PDT 2011
On Mon, Jun 13, 2011 at 11:38 PM, Chris Lattner <sabre at nondot.org> 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
More information about the cfe-commits
mailing list