1 /* $NetBSD: msg_145.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ 2 # 3 "msg_145.c" 3 4 // Test for message: cannot take size/alignment of bit-field [145] 5 6 struct bits { 7 unsigned one: 1; 8 unsigned eight: 8; 9 }; 10 11 unsigned long 12 sizeof_one(void) 13 { 14 struct bits local_bits; 15 16 return sizeof(local_bits.one); /* expect: 145 */ 17 } 18 19 unsigned long 20 sizeof_eight(void) 21 { 22 struct bits local_bits; 23 24 return sizeof(local_bits.eight); /* expect: 145 */ 25 } 26