14-09-2017, 05:18 AM
Dear MISRA team,
is the underlying type of
a) uint8_t (underlying type of an integer literal in chapter 6)?
or
b) uint16_t because the static_cast is taken into account (see static_cast(expression) in chapter 6)?
If the answer is a) then it would be impossible to make this line of code compliant with rule 5-0-10, right?
[code]const uint16_t MASK = 1U
is the underlying type of
Code:
static_cast(1U)
a) uint8_t (underlying type of an integer literal in chapter 6)?
or
b) uint16_t because the static_cast is taken into account (see static_cast(expression) in chapter 6)?
If the answer is a) then it would be impossible to make this line of code compliant with rule 5-0-10, right?
[code]const uint16_t MASK = 1U
<t></t>