https://issues.dlang.org/show_bug.cgi?id=14186
ag0ae...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ag0ae...@gmail.com --- Comment #1 from ag0ae...@gmail.com --- I'm not well-versed in C/C++, but according to these pages: http://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Operator-Precedence (points 13 and 14) http://en.cppreference.com/w/cpp/language/operator_precedence#content (point 15) it's C++ that deviated from C. Whereas D is line with C. A little test with gcc and g++ seems to confirm that: ---- #include <stdio.h> int main() { int b = 1, c = 1; 1 ? b : c = 0; printf("%d\n", b); return 0; } ---- Compiling with gcc gives ---- test.c: In function ‘main’: test.c:5:15: error: lvalue required as left operand of assignment 1 ? b : c = 0; ^ ---- Compiling with g++ succeeds, and running prints "1". --