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/2fd97e1a79a8
branches:  trunk
changeset: 958406:2fd97e1a79a8
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 765461f01d1c -r 2fd97e1a79a8 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 765461f01d1c -r 2fd97e1a79a8 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