summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_238.c
blob: 99bad647a154d9c454c83b95cd1bf2c670c438f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*	$NetBSD: msg_238.c,v 1.6 2023/03/28 14:44:35 rillig Exp $	*/
# 3 "msg_238.c"

/* Test for message: initialization of union is illegal in traditional C [238] */

/* lint1-flags: -tw -X 351 */

struct {
	int x;
} s = {
	3
};

union {
	int x;
/* expect+1: warning: initialization of union is illegal in traditional C [238] */
} u = {
	3
};