On Sun, Aug 4, 2013 at 4:41 PM, Andreas Schwab <schwab@linux-m68k.org>wrote:
> Chris Down <chris@chrisdown.name> writes:
>
> x+=a is the same as x=x+a. Now replace a by (x=1) and it becomes
> obvious that 1 is a perfectly valid outcome.
>
>
I still don't see that; for one thing even with:
#include <stdio.h>
int main(void) {
int x = 0;
printf("%d\n", x = x + (x = 1));
return 0;
}
I'm still seeing "assign x = 1, then do x + x, then assign the result to
x", which would give 2. gcc agrees with me. Especially with the parens
there, that's the order I would expect, but it's the same without as well.