Home | History | Annotate | Line # | Download | only in lint1
msg_335.c revision 1.1
      1 /*	$NetBSD: msg_335.c,v 1.1 2021/01/14 22:18:14 rillig Exp $	*/
      2 # 3 "msg_335.c"
      3 
      4 // Test for message: operand of '%s' must not be bool [335]
      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 example(bool b)
     14 {
     15 	b = +b;			/* expect: 335 */
     16 	b = -b;			/* expect: 335 */
     17 	b = !b;
     18 	b++;			/* expect: 335 */
     19 	++b;			/* expect: 335 */
     20 	b--;			/* expect: 335 */
     21 	--b;			/* expect: 335 */
     22 }
     23