[Issue 14364] DMD should compile (correctly) SDC test0167.d

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Mar 28 11:40:45 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14364

--- Comment #3 from ag0aep6g at gmail.com ---
(In reply to Shammah Chancellor from comment #2)
> So should this not compile?

Reading that spec page further:
> If the compiler can determine that the result of an expression is illegally dependent on the order of evaluation, it can issue an error (but is not required to). The ability to detect these kinds of errors is a quality of implementation issue.

So, compilers are encouraged to reject such code, but they can also accept it
and evaluate the sides of the assignment in either order.

> Isn't this at least a DLang Spec problem?

Feel free to file an enhancement request to specify one true order of
evaluation for AssignExpression.

--


More information about the Digitalmars-d-bugs mailing list