The endianness of bitfields is implementation defined. Is there a way to check, at compile time, whether via some macro or other compiler flag, what gcc's bitfield endianness actually is?
In other words, given something like:
struct X {
uint32_t a : 8;
uint32_t b : 24;
};
Is there a way for me to know at compile time whether or not a
is the first or last byte in X
?