<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 27.02.2012, at 22:48, Richard Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p><br>
On Feb 27, 2012 12:40 PM, "Sebastian Redl" <<a href="mailto:sebastian.redl@getdesigned.at">sebastian.redl@getdesigned.at</a>> wrote:<br>
><br>> ==============================================================================<br>
> --- cfe/trunk/test/CXX/expr/expr.ass/p9-cxx11.cpp (original)<br>
> +++ cfe/trunk/test/CXX/expr/expr.ass/p9-cxx11.cpp Mon Feb 27 14:34:02 2012<br>
> @@ -11,10 +11,9 @@<br>
>   z = { 1, 2 };<br>
>   z += { 1, 2 };<br>
><br>
> -  // FIXME: implement semantics of scalar init list assignment.<br>
>   int a, b;<br>
> -  a = b = { 1 }; // unexpected-error {{incompatible type 'void'}}<br>
> -  a = { 1 } = b; // unexpected-error {{incompatible type 'void'}}<br>
> +  a = b = { 1 };<br>
> +  a = { 1 } = b;</p><p>This is supposed to be ill-formed. How do we handle scalar compound assignments of braced-init-lists? My reading is that such assignments are also ill formed.</p></blockquote></div><br><div>You're right, the second line is supposed to be ill-formed, though I cannot figure out why it is accepted. Another thing to research.</div><div>Compound assignment with a braced-init-list on the RHS is valid.</div><div><br></div><div>I'll write more test cases.</div><div><br></div><div>Sebastian</div></body></html>