unsigned char x=1; x=(x++)<<3;
x=(++x)<<3; works it gives 16
Between consecutive "sequence points", an object's value can be modified only once by an expression. The only "sequence point" in your line of code is the ";". This means x is modified twice. Once by the =, and once by the ++. This code has no well defined meaning. It is not surprising that different implementations gave different answers.