xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_004.c (revision 3117ece4fc4a4ca4489ba793710b60b0d26bab6c)
1 /*	$NetBSD: msg_004.c,v 1.8 2024/05/04 06:52:17 rillig Exp $	*/
2 # 3 "msg_004.c"
3 
4 // Test for message: illegal type combination [4]
5 //
6 // See also:
7 //	msg_005.c
8 
9 /* lint1-extra-flags: -X 351 */
10 
11 // Lint does not detect "two or more data types", but GCC does.
12 signed double signed_double;
13 
14 int ok_int;
15 double ok_double;
16 float _Complex ok_float_complex;
17 
18 /* expect+2: error: invalid type for _Complex [308] */
19 /* expect+1: error: illegal type combination [4] */
20 int _Complex illegal_int_complex;
21 
22 char enum {
23 	CHAR
24 };
25 /* expect-1: error: illegal type combination [4] */
26 
27 long struct {
28 	int member;
29 };
30 /* expect-1: error: illegal type combination [4] */
31