xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_152.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_152.c,v 1.5 2023/03/28 14:44:34 rillig Exp $	*/
2 # 3 "msg_152.c"
3 
4 // Test for message: argument cannot have unknown size, arg #%d [152]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 /* expect+1: warning: struct 'incomplete' never defined [233] */
9 struct incomplete;
10 
11 /* expect+1: error: '<unnamed>' has incomplete type 'incomplete struct incomplete' [31] */
12 void callee(struct incomplete);
13 
14 void
caller(void)15 caller(void)
16 {
17 	/* expect+1: error: 'local_var' has incomplete type 'incomplete struct incomplete' [31] */
18 	struct incomplete local_var;
19 	/* expect+1: error: argument cannot have unknown size, arg #1 [152] */
20 	callee(local_var);
21 }
22