xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_031.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_031.c,v 1.9 2023/03/28 14:44:34 rillig Exp $	*/
2 # 3 "msg_031.c"
3 
4 // Test for message: '%s' has incomplete type '%s' [31]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 struct complete {
9 	int dummy;
10 };
11 
12 /* expect+1: warning: struct 'incomplete' never defined [233] */
13 struct incomplete;
14 
15 
16 struct complete complete_var;
17 
18 /* expect+1: error: 'incomplete_var' has incomplete type 'incomplete struct incomplete' [31] */
19 struct incomplete incomplete_var;
20 
21 
22 /* expect+1: error: '<unnamed>' has incomplete type 'incomplete struct incomplete' [31] */
23 void function(struct incomplete);
24