Vincent Lefevre wrote:- > > Before the conversion, the value is representable in the type of > the expression, and after the conversion (which is well-defined), > it is still representable in the (new) type of the expression. > 6.7.8#11 mentions the possible conversion. So, I disagree here.
Warnings aren't only intended for undefined things; they're supposed to point out suspect constructs. If my compiler didn't warn about assigning a 32-bit quantity to an 8-bit one I'd think it a poor implementation. Even better, you can turn of the warning with a cast, making your intent explicit to the compiler, so there's every reason to have it on by default. Neil.