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

// Test for message: initialization of incomplete type '%s' [175]

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

/* expect+1: warning: struct 'incomplete' never defined [233] */
struct incomplete;

/* expect+1: error: initialization of incomplete type 'incomplete struct incomplete' [175] */
struct incomplete incomplete = {
	"invalid"
};
/* expect-1: error: 'incomplete' has incomplete type 'incomplete struct incomplete' [31] */