CERT.BITFIELD.SIGN.MODIFIER

Bit-field not defined as signed or unsigned is implementation defined

Vulnerability and risk

Use of bit-field without specifying modifier is implementation defined and usage could affect portability

Vulnerable code example

struct ST { int a:5; /* Violation */ unsigned int b:4; /* OK */ signed int c:3; /* OK */ } F;

Element 'a' is not defined as signed or unsigned and may not be portable