1 typedef struct 2 { 3 unsigned char a : 2; 4 unsigned char b : 3; 5 unsigned char c : 1; 6 unsigned char d : 1; 7 unsigned char e : 1; 8 } a_struct; 9 foo(flags)10foo (flags) 11 a_struct *flags; 12 { 13 return (flags->c != 0 14 || flags->d != 1 15 || flags->e != 1 16 || flags->a != 2 17 || flags->b != 3); 18 } 19 main()20main () 21 { 22 a_struct flags; 23 24 flags.c = 0; 25 flags.d = 1; 26 flags.e = 1; 27 flags.a = 2; 28 flags.b = 3; 29 30 if (foo (&flags) != 0) 31 abort (); 32 else 33 exit (0); 34 } 35