1 /* $NetBSD: msg_336.c,v 1.7 2023/08/02 18:51:25 rillig Exp $ */
2 # 3 "msg_336.c"
3
4 // Test for message: left operand of '%s' must not be bool [336]
5 //
6 // See d_c99_bool_strict.c for many more examples.
7
8 /* lint1-extra-flags: -T -X 351 */
9
10 typedef _Bool bool;
11
12 void
13 test(bool);
14
15 void
example(bool b,int i)16 example(bool b, int i)
17 {
18 /* expect+2: error: left operand of '+' must not be bool [336] */
19 /* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */
20 test(b + i);
21
22 test(b);
23
24 test(i != 0);
25 }
26