Home | History | Annotate | Line # | Download | only in lint1
      1 /*	$NetBSD: msg_004.c,v 1.10 2025/04/12 15:49:50 rillig Exp $	*/
      2 # 3 "msg_004.c"
      3 
      4 // Test for message: invalid 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: invalid type combination [4] */
     20 int _Complex invalid_int_complex;
     21 
     22 char enum {
     23 	CHAR
     24 };
     25 /* expect-1: error: invalid type combination [4] */
     26 
     27 long struct {
     28 	int member;
     29 };
     30 /* expect-1: error: invalid type combination [4] */
     31 
     32 struct str {
     33 };
     34 /* expect+1: error: invalid type combination [4] */
     35 struct str int struct_str_int;
     36 
     37 /* expect+1: error: invalid type combination [4] */
     38 unsigned signed int unsigned_signed_int;
     39 
     40 /* expect+1: error: invalid type combination [4] */
     41 unsigned unsigned int unsigned_unsigned_int;
     42 
     43 /* expect+1: error: invalid type combination [4] */
     44 long long long int long_long_long_int;
     45 
     46 /* expect+1: error: invalid type combination [4] */
     47 short double short_double;
     48 
     49 double short double_short;
     50 
     51 /* expect+1: error: invalid type combination [4] */
     52 char double short char_double_short;
     53