xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_018.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_018.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
2 # 3 "msg_018.c"
3 
4 // Test for message: illegal use of 'void' [18]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 /* expect+1: error: void type for 'x' [19] */
9 void x;
10 
11 /* expect+1: error: cannot take size/alignment of void [146] */
12 unsigned long sizeof_void = sizeof(void);
13 
14 /* expect+2: error: illegal use of 'void' [18] */
15 /* expect+1: warning: empty array declaration for 'void_array' [190] */
16 void void_array[];
17