﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
280	Compound Literal Hoisted Out of Function/typeof	ajbeach		"A simple example of the problem:
{{{
forall( T & )
struct proxy {};

forall( T & )
void action( typeof( (proxy(T)){} ) & p ) {
    (void)p;
}
// Becomes (trimmed and cleaned):
proxy(T) _compLit0 = {};
forall(T &)
void action(typeof(_compLit0) &p){
    ((void)p);
}
}}}

Because T is a data type and the proxy constructor has no assertions, this actually compiles, it seems adding anything else to it will cause errors. However, it is non-sense and we should not be generating it.

To avoid cases like this, there should not be hoisting out of typeof, sizeof or other non-evaluated contexts. Since they are not evaluated anyways we don't actually need the memory.

If there are other cases where the storage would have to be hoisted out of a function and are evaluated, they may have to forbidden if the constructed type is polymorphic. Or handled specially depending on the case."	defect	new	major	cfa-cc	1.0			
