/* >>>------------------------------------------------------------ * * File: rule_6.4.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 6.4 (Required): * Bit fields shall only be defined to be of type unsigned int or * signed int. * * Implemented by messages: * 634 [I] Bit-fields in this struct/union have not been * declared explicitly as unsigned or signed. * * 635 [E] Bit-fields in this struct/union have been declared * with types other than int, signed int or unsigned int. * * <<<------------------------------------------------------------ */ /* PRQA S 3205 ++ */ #include "misra.h" #include "m2cmex.h" extern S16 test_0604( void ) { typedef enum { A, B, C } e_t; struct bitest { signed char is_ctr : 3; /* MISRA Violation */ unsigned char is_nul : 3; /* MISRA Violation */ int is_set : 5; /* MISRA Violation */ signed int is_key : 3; unsigned int is_big : 3; unsigned long is_dep : 3; /* MISRA Violation */ signed long is_bad : 2; /* MISRA Violation */ e_t is_enu : 2; /* MISRA Violation */ short is_sh1 : 2; /* MISRA Violation */ signed short is_sh2 : 2; /* MISRA Violation */ unsigned short is_sh3 : 2; /* MISRA Violation */ } obj_0604; return 0; }