﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
279	Compound Literal Construction Runs with Incorrect Timing	ajbeach		"The construction of a compound literal is happens too early.

The following code works in both C and Cforall:
{{{
#include <stdio.h>

struct iwrap {
    int value;
};

int main(int argc, char** argv) {
    int i = 3;
    printf(""before construction: %d\n"", i);
    struct iwrap obj = (++i, (struct iwrap){i});
    printf(""during construction: %d\n"", obj.value);
    printf(""after construction: %d\n"", i);
}
}}}

C outputs:
{{{
before construction: 3
during construction: 4
after construction: 4
}}}

Cforall outputs:
{{{
before construction: 3
during construction: 3
after construction: 4
}}}

I believe the constructor is being run when the storage is being allocated and not when the expression is actually evaluated."	defect	new	minor	cfa-cc	1.0			
