xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_049.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_049.c,v 1.5 2022/04/24 15:55:50 rillig Exp $	*/
2 # 3 "msg_049.c"
3 
4 /* Test for message: anonymous struct/union members is a C11 feature [49] */
5 
6 /* lint1-flags: -Sw */
7 
8 struct {
9 	unsigned int flag: 1;
10 
11 	/*
12 	 * This is an anonymous struct/union member, but that's not what
13 	 * message 49 is about.
14 	 */
15 	unsigned int :0;
16 
17 	union {
18 		int int_value;
19 		void *pointer_value;
20 	};
21 	/* expect-1: warning: anonymous struct/union members is a C11 feature [49] */
22 } s;
23