1 struct a { 2 int a:31; 3 int b:32; 4 long c:63; 5 long d:64; 6 int x:33; // KO 7 long y:65; // KO 8 }; 9 static struct a a; 10 11 struct b { 12 int m1:-1; // KO 13 int x1:2147483648; // KO 14 int :0; 15 int a0:0; // KO 16 }; 17 static struct b b; 18 19 /* 20 * check-name: bitfield-sizes 21 * check-command: sparse -m64 $file 22 * 23 * check-error-start 24 bitfield-sizes.c:12:18: error: bitfield 'm1' has invalid width (-1) 25 bitfield-sizes.c:13:26: error: bitfield 'x1' has invalid width (2147483648) 26 bitfield-sizes.c:15:17: error: bitfield 'a0' has invalid width (0) 27 bitfield-sizes.c:6:15: error: bitfield 'x' is wider (33) than its type (int) 28 bitfield-sizes.c:7:15: error: bitfield 'y' is wider (65) than its type (long) 29 * check-error-end 30 */ 31