3 ms·
Smaller-than-'int' types get implicitly promoted to 'int' before arithmetic. Results are indeed very funky.
by dzaima 3y ago
Smaller-than-'int' types get implicitly promoted to 'int' before arithmetic. Results are indeed very funky.
- ryao 3y agoThat makes sense then. Multiplying two uint16_t can wraparound in an int, while two int16_t or smaller cannot.