msg_331.c revision 1.3
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 10typedef _Bool bool; 11 12void 13test(bool); 14 15void 16example(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