xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_143.c (revision ae082add65442546470c0ba499a860ee89eed305)
1 /*	$NetBSD: msg_143.c,v 1.4 2022/06/16 16:58:36 rillig Exp $	*/
2 # 3 "msg_143.c"
3 
4 // Test for message: cannot take size/alignment of incomplete type [143]
5 
6 /* expect+1: warning: struct 'incomplete' never defined [233] */
7 struct incomplete;
8 
9 unsigned long
10 sizeof_incomplete(void)
11 {
12 	/* expect+1: error: cannot take size/alignment of incomplete type [143] */
13 	return sizeof(struct incomplete);
14 }
15