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: add test for 265 "c89 C does...



details:   https://anonhg.NetBSD.org/src/rev/c5000ae743c0
branches:  trunk
changeset: 949173:c5000ae743c0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 03 20:20:01 2021 +0000

description:
lint: add test for 265 "c89 C does not support 'long long'"

diffstat:

 tests/usr.bin/xlint/lint1/msg_265.c   |  14 ++++++++++----
 tests/usr.bin/xlint/lint1/msg_265.exp |   3 ++-
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r d78f62831183 -r c5000ae743c0 tests/usr.bin/xlint/lint1/msg_265.c
--- a/tests/usr.bin/xlint/lint1/msg_265.c       Sun Jan 03 20:14:38 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_265.c       Sun Jan 03 20:20:01 2021 +0000
@@ -1,7 +1,13 @@
-/*     $NetBSD: msg_265.c,v 1.1 2021/01/02 10:22:44 rillig Exp $       */
+/*     $NetBSD: msg_265.c,v 1.2 2021/01/03 20:20:01 rillig Exp $       */
 # 3 "msg_265.c"
 
-// Test for message: %s C does not support 'long long' [265]
+/* Test for message: %s C does not support 'long long' [265] */
+
+/* lint1-flags: -w */
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+long long unsupported_variable;
+
+/*LONGLONG*/
+long long suppressed_variable;
+
+long long another_unsupported_variable;
diff -r d78f62831183 -r c5000ae743c0 tests/usr.bin/xlint/lint1/msg_265.exp
--- a/tests/usr.bin/xlint/lint1/msg_265.exp     Sun Jan 03 20:14:38 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_265.exp     Sun Jan 03 20:20:01 2021 +0000
@@ -1,1 +1,2 @@
-msg_265.c(6): syntax error ':' [249]
+msg_265.c(8): warning: c89 C does not support 'long long' [265]
+msg_265.c(13): warning: c89 C does not support 'long long' [265]



Home | Main Index | Thread Index | Old Index