Home | History | Annotate | Line # | Download | only in lint1
      1  1.7  rillig /*	$NetBSD: msg_114.c,v 1.7 2023/07/07 19:45:22 rillig Exp $	*/
      2  1.1  rillig # 3 "msg_114.c"
      3  1.1  rillig 
      4  1.1  rillig // Test for message: %soperand of '%s' must be lvalue [114]
      5  1.1  rillig 
      6  1.7  rillig /* lint1-extra-flags: -X 351 */
      7  1.7  rillig 
      8  1.5  rillig /* ARGSUSED */
      9  1.2  rillig void
     10  1.5  rillig example(int a)
     11  1.2  rillig {
     12  1.5  rillig 	/* expect+1: error: operand of 'x++' must be lvalue [114] */
     13  1.5  rillig 	3++;
     14  1.4  rillig 
     15  1.4  rillig 	/*
     16  1.4  rillig 	 * Before tree.c 1.137 from 2021-01-09, trying to increment an array
     17  1.4  rillig 	 * aborted lint with 'common/tyname.c, 190: tspec_name(0)'.
     18  1.4  rillig 	 *
     19  1.4  rillig 	 * See msg_108.c for more details.
     20  1.4  rillig 	 */
     21  1.6  rillig 	/* expect+1: error: operand of 'x++' has invalid type 'array[7] of char' [108] */
     22  1.5  rillig 	"string"++;
     23  1.4  rillig 
     24  1.5  rillig 	/* expect+1: error: operand of 'x++' must be lvalue [114] */
     25  1.5  rillig 	(a + a)++;
     26  1.2  rillig }
     27