@Peter-ReinstateMonica The key here is that essential type is the type of the operand
before any promotion takes place. The operands are essentially uint8 and the result is assigned to a variable which is essentially uint16. Historically, MISRA-C have been afraid of beginner programmers being so daft that they think that the arithmetic in
uint32_t a = u16a + u16b;
is carried out on
uint32_t
just because the result is stored in such a type. I always found that to be a silly concern, but maybe they based this rule on some actual population studies... they don't give out a source. —
Lundin 45 secs ago