I was reading over the ISO standard of c++ and I came over this bit-field declarations. The following code is not well clear to me
struct {
char a;
int b:5,
c:11,
:0,
d:8;
struct {int ee:8;}
e;
}
Here it is specified that the fields a, d and e.ee have different memory locations and they can be modified independently using multiple threads. The bitfields b and c uses same memory locations so they cant be modified concurrently. I dont understand the significance of using two bit fields for c i.e, c:11,:0,. can anybody clear my vision about this? thank you