Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 lint: document that message 108 do...
details: https://anonhg.NetBSD.org/src/rev/432124a1f14d
branches: trunk
changeset: 980324:432124a1f14d
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jan 31 16:00:05 2021 +0000
description:
lint: document that message 108 doesn't abort anymore
diffstat:
tests/usr.bin/xlint/lint1/msg_114.c | 13 ++++++++++---
tests/usr.bin/xlint/lint1/msg_114.exp | 3 ++-
2 files changed, 12 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 1f6102039c1d -r 432124a1f14d tests/usr.bin/xlint/lint1/msg_114.c
--- a/tests/usr.bin/xlint/lint1/msg_114.c Sun Jan 31 14:57:28 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_114.c Sun Jan 31 16:00:05 2021 +0000
@@ -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 @@
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 */
}
diff -r 1f6102039c1d -r 432124a1f14d tests/usr.bin/xlint/lint1/msg_114.exp
--- a/tests/usr.bin/xlint/lint1/msg_114.exp Sun Jan 31 14:57:28 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_114.exp Sun Jan 31 16:00:05 2021 +0000
@@ -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]
Home |
Main Index |
Thread Index |
Old Index