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



--- Comment #4 from David Krauss <potswa at mac dot com> 2013-03-10 02:18:18 
UTC ---

Note, there is nothing in the Standard to prohibit return of an

initializer_list value, so this rejects programs which are conformant.



Unless/until #56568 is resolved, doing so results in UB (whether or not that's

a bug). That's only if the function is executed.



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 }; }();



Not filing another report yet because I haven't pulled the changes and tested

anything for myself.

Reply via email to