[cfe-commits] r53174 - in /cfe/trunk: lib/AST/Expr.cpp lib/Sema/SemaDecl.cpp test/Sema/compound-literal.c
Eli Friedman
eli.friedman at gmail.com
Mon Jul 7 16:06:20 PDT 2008
On Mon, Jul 7, 2008 at 9:46 AM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
> Author: nlopes
> Date: Mon Jul 7 11:46:50 2008
> New Revision: 53174
>
> URL: http://llvm.org/viewvc/llvm-project?rev=53174&view=rev
> Log:
> fix CheckForConstantInitializer() for Compound Literals
> also fix the correspondent test (it was expecting more errors than it should. please confirm my fix is correct (at least gcc agrees with me)
A struct is not a constant expression per the C99 standard. The fact
that gcc accepts this is an extension, documented at the bottom of
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Compound-Literals.html.
If we do accept it, we should ext-warn.
-Eli
More information about the cfe-commits
mailing list