Bitfield not compliance with MISRA 2012

PotomanPotoman Posts: 1


I try to wrote this struct :

struct toto {

_Bool TEST : 1;


But Cpptest tell me that TEST should be a int signed or not following Rule 6.1.

But Misra tell us that it is allowed to use _Bool.

So what's wrong ?



  • mstaronmstaron Posts: 26

    MISRA C:2012 standard defines rule 6.1 differently for C90 and C99 standards. C++test rule MISRAC2012-RULE_6_1-a is compliant with c90, so violations are reported if a bit-field type is different than signed int or unsigned int. Currently there is no rule compliant with c99, but Parasoft might implement this rule in the future.

Sign In or Register to comment.