Home | History | Annotate | Line # | Download | only in lint1
msg_114.c revision 1.6
      1  1.6  rillig /*	$NetBSD: msg_114.c,v 1.6 2022/06/21 21:18:30 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.5  rillig /* ARGSUSED */
      7  1.2  rillig void
      8  1.5  rillig example(int a)
      9  1.2  rillig {
     10  1.5  rillig 	/* expect+1: error: operand of 'x++' must be lvalue [114] */
     11  1.5  rillig 	3++;
     12  1.4  rillig 
     13  1.4  rillig 	/*
     14  1.4  rillig 	 * Before tree.c 1.137 from 2021-01-09, trying to increment an array
     15  1.4  rillig 	 * aborted lint with 'common/tyname.c, 190: tspec_name(0)'.
     16  1.4  rillig 	 *
     17  1.4  rillig 	 * See msg_108.c for more details.
     18  1.4  rillig 	 */
     19  1.6  rillig 	/* expect+1: error: operand of 'x++' has invalid type 'array[7] of char' [108] */
     20  1.5  rillig 	"string"++;
     21  1.4  rillig 
     22  1.5  rillig 	/* expect+1: error: operand of 'x++' must be lvalue [114] */
     23  1.5  rillig 	(a + a)++;
     24  1.2  rillig }
     25