1 /* $NetBSD: msg_330.c,v 1.8 2023/08/02 18:51:25 rillig Exp $ */ 2 # 3 "msg_330.c" 3 4 // Test for message: operand of '%s' must be bool, not '%s' [330] 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 called(bool); 14 15 /*ARGSUSED*/ 16 void 17 example(bool b, char c, int i) 18 { 19 called(!b); 20 21 /* expect+2: error: operand of '!' must be bool, not 'char' [330] */ 22 /* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */ 23 called(!c); 24 25 /* expect+2: error: operand of '!' must be bool, not 'int' [330] */ 26 /* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */ 27 called(!i); 28 } 29