Assignment Ops and Side Effects
Brian Bliss
bliss at sp64.csrd.uiuc.edu
Fri Apr 5 06:23:14 AEST 1991
> how does the standard describe the situation where, for example,
> x++ *= y;
> is treated as if it were
> x++ = x * y;
> and not
> x++ = x++ * y;
The result of an increment or decrement operation is not a legal
lhs of an expression.
bb
P.S. an interesting tidbit I just found out:
if you're on a machine where sizeof (int) == 4, then
char ch;
sizeof (ch += 1) == 4
sizeof (ch++) == 1
apparrently operands of ++ and -- do not undergo integral promotion
More information about the Comp.lang.c
mailing list