Is the order of the members in a) in structure b) in the guaruanteed bitfield? In other words, given a specific member of a structure or bit field, am I sure that its offset from the beginning of the structure / bit field will be no less than the sum of the sizes of the members that preceded it?
To give an example:
struct S{
char a[N];
unsigned b : M;
char c : O;
};
Will the offset c be at least sizeof(a)+sizeof(b)?
source
share