1 /* $NetBSD: msg_239.c,v 1.10 2025/04/10 20:16:30 rillig Exp $ */ 2 # 3 "msg_239.c" 3 4 // Test for message: constant operand to '!' [239] 5 // This message is not used. 6 // Its purpose is unclear, as a constant condition is not a bug by itself. 7 // See msg_382.c for a similar pattern that catches real bugs. 8 9 /* lint1-extra-flags: -h -X 351 */ 10 11 _Bool 12 example(int n) 13 { 14 _Bool b; 15 16 /* was: warning: constant operand to '!' [239] */ 17 b = !0; 18 /* was: warning: constant operand to '!' [239] */ 19 b = !1; 20 b = !(n > 1); 21 22 return b; 23 } 24