http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56567



--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-11 
03:21:52 UTC ---

(In reply to comment #4)

> It's certainly legal to compile a function returning an std::initializer list,

> which is never called. So this fix is problematic. For example

> 

> []{ return std::initializer_list< int >{ 1, 2 }; }();



That's a good point, though returning an initializer_list value is completely

useless; since the underlying array is local to the returning function, any use

of the returned value would cause undefined behavior, just like returning a

reference to a local variable.

Reply via email to