On 25 May 2015 at 21:02, kinke via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On Monday, 25 May 2015 at 17:21:05 UTC, Johannes Pfau wrote: > >> import std.stdio; >> void main() >> { >> int a = 0; >> int bar() >> { >> a++; >> return a; >> } >> a += bar(); // => a = a + bar() >> writeln(a); >> } >> >> DMD: 2 >> GDC: 1 >> >> which one is correct? >> > > So what about my previous example? > > int b = 0; > ((++b *= 5) *= 2) += ++b * (b -= 6); > > DMD 2.067.1: 60, latest LDC: 65, GDC: ? > > If the litmus test is "What does GDC do?", then LDC is doing it the correct way. :-)