Judging from your example, with several assignments, I suspect that your view point is that "=" is simply part of the expression, therefore the warning on expression evaluation holds for the entire statement. So I'll address that:aciddose wrote:For example:
y++ = (x++ = (y++ = x++) * x++ * y++);
This is a compound statement—statements combined within statements. Compound statements are a convenience for the programmer, but individually they must obey the rules. In the case of your example, all of the statements are illegal.
They are illegal because "x++" and "y++" are not lvals. It's not a matter of these statements not executing correctly—the compiler will simply not compile them. And it will tell you why—the old way is to tell you that they aren't lvals (I see that Xcode now says it in more plain English—"Expression is not assignable", with "y++" highlighted, starting with the innermost one).
However, "*dest++" is an lval. And its behavior for assignment ("*dest++ =...") is defined explicitly in C/C++. It means "assign the value of the expression on the right of the equal sign to the location pointed to by dest, then increment dest". It's not a C compiler if it doesn't do this.
