<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 May 2015 at 21:02, kinke via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday, 25 May 2015 at 17:21:05 UTC, Johannes Pfau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
import std.stdio;<br>
void main()<br>
{<br>
    int a = 0;<br>
    int bar()<br>
    {<br>
        a++;<br>
        return a;<br>
    }<br>
    a += bar(); // => a = a + bar()<br>
    writeln(a);<br>
}<br>
<br>
DMD: 2<br>
GDC: 1<br>
<br>
which one is correct?<br>
</blockquote>
<br></span>
So what about my previous example?<br>
<br>
int b = 0;<span class=""><br>
((++b *= 5) *= 2) += ++b * (b -= 6);<br>
<br></span>
DMD 2.067.1: 60, latest LDC: 65, GDC: ?<br>
<br></blockquote><div><br></div><div>If the litmus test is "What does GDC do?", then LDC is doing it the correct way. :-)<br></div><div> </div></div></div></div>