[cfe-commits] r53174 - in /cfe/trunk: lib/AST/Expr.cpp lib/Sema/SemaDecl.cpp test/Sema/compound-literal.c

Nuno Lopes nunoplopes at sapo.pt
Tue Jul 8 14:34:23 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.

Ok, thanks for the feedback. I'll take a look.

More information about the cfe-commits mailing list