msg_145.c revision 1.3
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 6struct bits { 7 unsigned one: 1; 8 unsigned eight: 8; 9}; 10 11unsigned long 12sizeof_one(void) 13{ 14 struct bits local_bits; 15 16 return sizeof(local_bits.one); /* expect: 145 */ 17} 18 19unsigned long 20sizeof_eight(void) 21{ 22 struct bits local_bits; 23 24 return sizeof(local_bits.eight); /* expect: 145 */ 25} 26