msg_145.c revision 1.2
1/* $NetBSD: msg_145.c,v 1.2 2021/01/08 21:25:03 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); 17} 18 19unsigned long 20sizeof_eight(void) 21{ 22 struct bits local_bits; 23 24 return sizeof(local_bits.eight); 25} 26