msg_114.c revision 1.5 1 /* $NetBSD: msg_114.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */
2 # 3 "msg_114.c"
3
4 // Test for message: %soperand of '%s' must be lvalue [114]
5
6 /* ARGSUSED */
7 void
8 example(int a)
9 {
10 /* expect+1: error: operand of 'x++' must be lvalue [114] */
11 3++;
12
13 /*
14 * Before tree.c 1.137 from 2021-01-09, trying to increment an array
15 * aborted lint with 'common/tyname.c, 190: tspec_name(0)'.
16 *
17 * See msg_108.c for more details.
18 */
19 /* expect+1: error: operand of 'x++' has invalid type (array) [108] */
20 "string"++;
21
22 /* expect+1: error: operand of 'x++' must be lvalue [114] */
23 (a + a)++;
24 }
25