xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_018.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_018.c,v 1.5 2022/06/22 19:23:18 rillig Exp $	*/
2 # 3 "msg_018.c"
3 
4 // Test for message: illegal use of 'void' [18]
5 
6 /* expect+1: error: void type for 'x' [19] */
7 void x;
8 
9 /* expect+1: error: cannot take size/alignment of void [146] */
10 unsigned long sizeof_void = sizeof(void);
11 
12 /* expect+2: error: illegal use of 'void' [18] */
13 /* expect+1: warning: empty array declaration for 'void_array' [190] */
14 void void_array[];
15