Home | History | Annotate | Line # | Download | only in lint1
msg_186.c revision 1.4
      1 /*	$NetBSD: msg_186.c,v 1.4 2021/02/22 15:09:50 rillig Exp $	*/
      2 # 3 "msg_186.c"
      3 
      4 /* Test for message: bit-field initialization is illegal in traditional C [186] */
      5 
      6 /* lint1-flags: -tw */
      7 
      8 struct bit_field {
      9 	unsigned one: 1;
     10 	unsigned three: 3;
     11 	unsigned two: 2;
     12 };
     13 
     14 struct bit_field bit_field = {
     15 	1,
     16 	3.0,			/* expect: 186 */
     17 	2
     18 };
     19 /* XXX: The message is misleading.  Initialization using integers is ok. */
     20