[cfe-commits] r147026 - in /cfe/trunk: lib/AST/Expr.cpp test/Sema/static-init.c

Richard Smith richard at metafoo.co.uk
Sun Dec 25 12:40:04 PST 2011


On Thu, December 22, 2011 09:33, Eli Friedman wrote:
> On Thu, Dec 22, 2011 at 12:08 AM, Richard Smith <richard at metafoo.co.uk>
> wrote:
>
>>> For CXXTemporaryObjectExpr: we give an error for the following. I
>>> can't think of any obvious reason why it isn't legal:
>>>
>>> struct A { int x; }; constexpr A x = A();
>>
>> That's ill-formed because a constexpr constructor is required to initialize
>>  all members.
>
> Which constructor?  As far as I can tell, this snippet doesn't call
> A's default constructor.

Right you are. Fixed in r147271.

- Richard




More information about the cfe-commits mailing list