Little experiment to check how integer promotion affects bitfields.
The interest in this came after the discussion at https://lore.kernel.org/all/[email protected]/t/#u
Turns out that for bitfields bigger than sizeof(int)
the behavior is compiler dependent.
c_bitfields_integer_promotion/main.c
Lines 1 to 33 in 55cff64
https://gcc.gnu.org/onlinedocs/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html
https://stackoverflow.com/questions/2647320/struct-bitfield-max-size-c99-c
https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Bit-Fields
https://stackoverflow.com/questions/46073295/implicit-type-promotion-rules