unsigned char x=1; x=(x++)<<3;
x=(++x)<<3; works it gives 16
Please see http://www.eskimo.com/~scs/C-faq/q3.3.html
x = (x++) << 3;
x = x + 1 << 3;
Mark, thanks for good point: http://www.eskimo.com/~scs/C-faq/q3.3.html http://www.eskimo.com/~scs/C-faq/top.html It is a good place to understand why I intuitively avoid some ambiguous C-constructions :) On the other side, this is a 'style' quiestion. For example, in your case I always write as
x = (x + 1) << 3;
unsigned char x = 1; x = (x++) << 3;
LVALUE = EXPRESSION