Example

struct MyStruct {

unsigned char field:2;

};

Solution
Only use int types as bit fields.

struct MyStruct {

unsigned int field:2;
 

};