1 2 3 4 5 6 7 8 9 10 11 12 13
struct a { unsigned int bitfield : 1; }; unsigned int x; main() { struct a a = {0}; x = 0xbeef; a.bitfield |= x; if (a.bitfield != 1) abort (); exit (0); }