11.2Srillig/* $NetBSD: msg_344.c,v 1.2 2022/06/17 18:54:53 rillig Exp $ */ 21.1Srillig# 3 "msg_344.c" 31.1Srillig 41.1Srillig// Test for message: bit-field of type plain 'int' has implementation-defined signedness [344] 51.1Srillig 61.1Srillig/* lint1-extra-flags: -p */ 71.1Srillig 81.1Srillig/* 91.1Srillig * C90 3.5.2.1 allows 'int', 'signed int', 'unsigned int' as bit-field types. 101.1Srillig * 111.1Srillig * C99 6.7.2.1 significantly changed the wording of the allowable types for 121.1Srillig * bit-fields. For example, 6.7.2.1p4 does not mention plain 'int' at all. 131.1Srillig * The rationale for C99 6.7.2.1 mentions plain 'int' though, and it would 141.1Srillig * have broken a lot of existing code to disallow plain 'int' as a bit-field 151.1Srillig * type. Footnote 104 explicitly mentions plain 'int' as well and it even 161.1Srillig * allows typedef-types for bit-fields. 171.1Srillig */ 181.1Srilligstruct example { 191.2Srillig /* expect+1: warning: bit-field of type plain 'int' has implementation-defined signedness [344] */ 201.1Srillig int plain_int: 1; 211.1Srillig 221.1Srillig signed int signed_int: 1; 231.1Srillig unsigned int unsigned_int: 1; 241.1Srillig}; 25