So I did some googling and based on our lord and saviour stackoverflow, it looks like the result would be a signed int (and whatever stdint.h type that corresponds to), since uint8_t has a lower "rank" than int.
Details not withstanding, I absolutely agree with your base point that the promotion rules in C are wildly confusing, and why you'll see casts which would otherwise be unnecessary all over C code, especially in bit manipulations
1
u/tiajuanat Jun 22 '22
Nope. It's likely either U16 (generally 8 and 16 bit devices) or U32(generally 32 and 64 bit devices).