3 ms·
I think it should be const x: i16 = -1 * 32768; // valid In the text it's i32
by sharikous 3y ago
I think it should be
const x: i16 = -1 * 32768; // valid
In the text it's i32
- kevin_thibedeau 3y agoThat explanation is bogus anyway. It's a unary operator applied to a positive integer literal. No multiplication involved. In this case the range issue can be addressed in C by using the "L" suffix to upgrade the literal to 32-bit and let the compiler truncate it back to 16-bit.