CERT.BITFIELD.NOT.INT

Bit-field not defined as 'int' type is a language extension

Vulnerable code example

enum ET {A=0, B=1, C=2, D=3} struct ST { signed int a:3; /* OK */ unsigned int b:4; /* OK */ unsigned char c:6; /* Violation */ unsigned short d:5; /* Violation */ enum ET e:2; /* Violation */ } F;

Elements not defined as 'int' type may not be portable