On Feb 2, 2011, at 1:28 PM, Rick Mann wrote: > ... according to my K&R C book (which you seem to be saying is out of date), > the smaller type is promoted to a larger type when the types on an operator > are different. ...
C99 spec: <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf> Page 84 > Bitwise shift operators > ... > The integer promotions are performed on each of the operands. The type of the > result is that of the promoted left operand. > ... And from page 43, "the integer promotions" means: > If an int can represent all values of the original type, the value is > converted to an int; otherwise, it is converted to an unsigned int. These are > called the integer promotions. All other types are unchanged by the integer > promotions. Cheers, --Dave _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
