Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enumeration specifiers
#2
MISRA-C meeting 22-8-2006

The type of the enumeration constant is defined by ISO to be signed int.

In your example, the switch selector has type unsigned int, and the case constants have type signed int. This is a violation of rule 10.1.
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)