The following code fails on a MISRA check. The concrete error message is:
(MISRA-C:2004 10.1/R) The value of an expression of integer type shall not
I would suspect the compiler internally handles enums as unsigned integer, as long there is no negative value within the enum.
enums
unsigned integer
enum