ouah
Re:C Traps and Pitfalls (1988) [pdf]
on Saturday June 20, 2015 @11:19AM (#9750168)
"Incidentally, it is a common misconception that if c is a character variable, one can obtain the unsigned integer equivalent of c by writing (unsigned) c. This fails because a char quantity is converted to int before any operator is applied to it, even a cast. Thus c is converted first to a signed integer and then to an unsigned integer, with possibly unexpected results."
The "even a cast" part is wrong. The usual arithmetic conversions (including the integer promotion) is not done with the cast operation in C.
Re:Bjarne Stroustrup on Dennis Ritchie: They said it couldn't be done,...
on Sunday October 16, 2011 @10:37AM (#3117384)
The case of typeof has already been discussed for C99 and it has been rejected. In ISO C99 Rationale document (section 6.7.7), it is written: "A proposed typeof operator was rejected on the grounds of insufficient utility." Don't forget most of the work of the C committee is spent in resisting features suggestions.