1 /* $NetBSD: msg_331.c,v 1.3 2021/04/05 01:35:34 rillig Exp $ */ 2 # 3 "msg_331.c" 3 4 // Test for message: left operand of '%s' must be bool, not '%s' [331] 5 // 6 // See d_c99_bool_strict.c for many more examples. 7 8 /* lint1-extra-flags: -T */ 9 10 typedef _Bool bool; 11 12 void 13 test(bool); 14 15 void 16 example(bool b, char c, int i) 17 { 18 test(b && b); 19 test(c && b); /* expect: 331 *//* expect: 334 */ 20 test(i && b); /* expect: 331 *//* expect: 334 */ 21 22 test(c != '\0'); 23 test(i != 0); 24 } 25