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