| @@ -1,7 +1,18 @@ | | | @@ -1,7 +1,18 @@ |
1 | /* $NetBSD: msg_239.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */ | | 1 | /* $NetBSD: msg_239.c,v 1.3 2021/04/02 22:38:42 rillig Exp $ */ |
2 | # 3 "msg_239.c" | | 2 | # 3 "msg_239.c" |
3 | | | 3 | |
4 | // Test for message: constant argument to NOT [239] | | 4 | // Test for message: constant argument to NOT [239] |
5 | | | 5 | |
6 | TODO: "Add example code that triggers the above message." /* expect: 249 */ | | 6 | /* lint1-extra-flags: -h */ |
7 | TODO: "Add example code that almost triggers the above message." | | 7 | |
| | | 8 | _Bool |
| | | 9 | example(int n) |
| | | 10 | { |
| | | 11 | _Bool b; |
| | | 12 | |
| | | 13 | b = !0; /* expect: constant in conditional context, 239 */ |
| | | 14 | b = !1; /* expect: constant in conditional context, 239 */ |
| | | 15 | b = !(n > 1); |
| | | 16 | |
| | | 17 | return b; |
| | | 18 | } |