Is the order of members in a) in a struct b) in a bitfield guaruanteed? In other words, given a certain member of a struct or a bitfield, am I guaranteed that its offset from the beginning of the struct/bitfield 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 of c be at least sizeof(a)+sizeof(b)
?