xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_049.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_049.c,v 1.6 2023/03/28 14:44:34 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 -X 351 */
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