Module Name:    src
Committed By:   rillig
Date:           Sun Jan 31 16:00:05 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_114.c msg_114.exp

Log Message:
lint: document that message 108 doesn't abort anymore


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_114.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_114.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_114.c
diff -u src/tests/usr.bin/xlint/lint1/msg_114.c:1.3 src/tests/usr.bin/xlint/lint1/msg_114.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_114.c:1.3	Sun Jan 31 11:12:07 2021
+++ src/tests/usr.bin/xlint/lint1/msg_114.c	Sun Jan 31 16:00:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_114.c,v 1.3 2021/01/31 11:12:07 rillig Exp $	*/
+/*	$NetBSD: msg_114.c,v 1.4 2021/01/31 16:00:05 rillig Exp $	*/
 # 3 "msg_114.c"
 
 // Test for message: %soperand of '%s' must be lvalue [114]
@@ -7,7 +7,14 @@ void
 example(int a)			/* expect: 231 */
 {
 	3++;			/* expect: 114 */
-	// FIXME: lint error: ../common/tyname.c, 190: tspec_name(0)
-	// "string"++;
+
+	/*
+	 * Before tree.c 1.137 from 2021-01-09, trying to increment an array
+	 * aborted lint with 'common/tyname.c, 190: tspec_name(0)'.
+	 *
+	 * See msg_108.c for more details.
+	 */
+	"string"++;		/* expect: 108 */
+
 	(a + a)++;		/* expect: 114 */
 }

Index: src/tests/usr.bin/xlint/lint1/msg_114.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_114.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_114.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_114.exp:1.2	Fri Jan  8 21:25:03 2021
+++ src/tests/usr.bin/xlint/lint1/msg_114.exp	Sun Jan 31 16:00:05 2021
@@ -1,3 +1,4 @@
 msg_114.c(9): operand of 'x++' must be lvalue [114]
-msg_114.c(12): operand of 'x++' must be lvalue [114]
+msg_114.c(17): operand of 'x++' has invalid type (array) [108]
+msg_114.c(19): operand of 'x++' must be lvalue [114]
 msg_114.c(7): warning: argument a unused in function example [231]

Reply via email to