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 tests for several messages



details:   https://anonhg.NetBSD.org/src/rev/7a0a50466f16
branches:  trunk
changeset: 1017762:7a0a50466f16
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jan 08 21:25:03 2021 +0000

description:
lint: add tests for several messages

diffstat:

 tests/usr.bin/xlint/lint1/msg_050.c   |  14 ++++++++++----
 tests/usr.bin/xlint/lint1/msg_050.exp |  10 +++++++++-
 tests/usr.bin/xlint/lint1/msg_051.c   |  12 +++++++++---
 tests/usr.bin/xlint/lint1/msg_051.exp |   5 ++++-
 tests/usr.bin/xlint/lint1/msg_054.c   |  13 +++++++++----
 tests/usr.bin/xlint/lint1/msg_054.exp |   9 ++++++++-
 tests/usr.bin/xlint/lint1/msg_055.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_055.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_056.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_056.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_057.c   |  13 ++++++++++---
 tests/usr.bin/xlint/lint1/msg_057.exp |   7 ++++++-
 tests/usr.bin/xlint/lint1/msg_060.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_060.exp |   5 ++++-
 tests/usr.bin/xlint/lint1/msg_061.c   |   5 ++---
 tests/usr.bin/xlint/lint1/msg_061.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_066.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_066.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_068.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_068.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_075.c   |   5 ++---
 tests/usr.bin/xlint/lint1/msg_075.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_081.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_081.exp |   9 ++++++++-
 tests/usr.bin/xlint/lint1/msg_082.c   |   9 +++++----
 tests/usr.bin/xlint/lint1/msg_082.exp |   9 ++++++++-
 tests/usr.bin/xlint/lint1/msg_083.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_083.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_084.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_084.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_089.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_089.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_100.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_100.exp |  10 +++++++++-
 tests/usr.bin/xlint/lint1/msg_101.c   |  13 ++++++++++---
 tests/usr.bin/xlint/lint1/msg_101.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_109.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_109.exp |   4 +++-
 tests/usr.bin/xlint/lint1/msg_114.c   |  12 +++++++++---
 tests/usr.bin/xlint/lint1/msg_114.exp |   4 +++-
 tests/usr.bin/xlint/lint1/msg_115.c   |  15 ++++++++++++---
 tests/usr.bin/xlint/lint1/msg_115.exp |   7 ++++++-
 tests/usr.bin/xlint/lint1/msg_116.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_116.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_121.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_121.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_122.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_122.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_126.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_126.exp |   6 +++++-
 tests/usr.bin/xlint/lint1/msg_130.c   |  17 ++++++++++++++---
 tests/usr.bin/xlint/lint1/msg_130.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_133.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_133.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_136.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_136.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_142.c   |   5 ++---
 tests/usr.bin/xlint/lint1/msg_142.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_143.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_143.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_144.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_144.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_145.c   |  24 +++++++++++++++++++++---
 tests/usr.bin/xlint/lint1/msg_145.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_146.c   |   9 ++++++---
 tests/usr.bin/xlint/lint1/msg_146.exp |   3 ++-
 tests/usr.bin/xlint/lint1/msg_150.c   |  12 +++++++++---
 tests/usr.bin/xlint/lint1/msg_150.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_156.c   |  24 +++++++++++++++++++++---
 tests/usr.bin/xlint/lint1/msg_156.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_164.c   |  13 ++++++++++---
 tests/usr.bin/xlint/lint1/msg_164.exp |   5 ++++-
 tests/usr.bin/xlint/lint1/msg_165.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_165.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_167.c   |  17 ++++++++++++++---
 tests/usr.bin/xlint/lint1/msg_167.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_170.c   |  13 ++++++++++---
 tests/usr.bin/xlint/lint1/msg_170.exp |   4 +++-
 tests/usr.bin/xlint/lint1/msg_172.c   |  11 ++++++++---
 tests/usr.bin/xlint/lint1/msg_172.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_173.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/msg_173.exp |   2 +-
 tests/usr.bin/xlint/lint1/msg_174.c   |  15 ++++++++++++---
 tests/usr.bin/xlint/lint1/msg_174.exp |   2 +-
 84 files changed, 441 insertions(+), 171 deletions(-)

diffs (truncated from 1113 to 300 lines):

diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_050.c
--- a/tests/usr.bin/xlint/lint1/msg_050.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_050.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,13 @@
-/*     $NetBSD: msg_050.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_050.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_050.c"
 
-// Test for message: a function is declared as an argument: %s [50]
+/* Test for message: a function is declared as an argument: %s [50] */
+
+/* lint1-flags: -Stw */
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+typedef void (function)();
+
+void example(f)
+    function f;
+{
+}
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_050.exp
--- a/tests/usr.bin/xlint/lint1/msg_050.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_050.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,9 @@
-msg_050.c(6): syntax error ':' [249]
+(1): warning: 'long double' is illegal in traditional C [266]
+(1): warning: function prototypes are illegal in traditional C [270]
+(2): warning: 'long double' is illegal in traditional C [266]
+(2): warning: function prototypes are illegal in traditional C [270]
+(3): warning: 'long double' is illegal in traditional C [266]
+(3): warning: 'long double' is illegal in traditional C [266]
+(3): warning: function prototypes are illegal in traditional C [270]
+msg_050.c(11): warning: a function is declared as an argument: f [50]
+msg_050.c(10): warning: argument f unused in function example [231]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_051.c
--- a/tests/usr.bin/xlint/lint1/msg_051.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_051.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,13 @@
-/*     $NetBSD: msg_051.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_051.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_051.c"
 
 // Test for message: parameter mismatch: %d declared, %d defined [51]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+void
+example(int, int);
+
+void
+example(a, b, c)
+    int a, b, c;
+{
+}
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_051.exp
--- a/tests/usr.bin/xlint/lint1/msg_051.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_051.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,4 @@
-msg_051.c(6): syntax error ':' [249]
+msg_051.c(12): parameter mismatch: 2 declared, 3 defined [51]
+msg_051.c(10): warning: argument a unused in function example [231]
+msg_051.c(10): warning: argument b unused in function example [231]
+msg_051.c(10): warning: argument c unused in function example [231]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_054.c
--- a/tests/usr.bin/xlint/lint1/msg_054.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_054.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,12 @@
-/*     $NetBSD: msg_054.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_054.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_054.c"
 
-// Test for message: trailing ',' prohibited in enum declaration [54]
+/* Test for message: trailing ',' prohibited in enum declaration [54] */
+
+/* lint1-flags: -tw */
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+enum color {
+       RED,
+       GREEN,
+       BLUE,
+};
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_054.exp
--- a/tests/usr.bin/xlint/lint1/msg_054.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_054.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,8 @@
-msg_054.c(6): syntax error ':' [249]
+(1): warning: 'long double' is illegal in traditional C [266]
+(1): warning: function prototypes are illegal in traditional C [270]
+(2): warning: 'long double' is illegal in traditional C [266]
+(2): warning: function prototypes are illegal in traditional C [270]
+(3): warning: 'long double' is illegal in traditional C [266]
+(3): warning: 'long double' is illegal in traditional C [266]
+(3): warning: function prototypes are illegal in traditional C [270]
+msg_054.c(12): warning: trailing ',' prohibited in enum declaration [54]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_055.c
--- a/tests/usr.bin/xlint/lint1/msg_055.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_055.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_055.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_055.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_055.c"
 
 // Test for message: integral constant expression expected [55]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+enum color {
+       WHITE = 1.0
+};
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_055.exp
--- a/tests/usr.bin/xlint/lint1/msg_055.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_055.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,1 @@
-msg_055.c(6): syntax error ':' [249]
+msg_055.c(8): integral constant expression expected [55]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_056.c
--- a/tests/usr.bin/xlint/lint1/msg_056.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_056.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_056.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_056.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_056.c"
 
 // Test for message: integral constant too large [56]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+enum color {
+       WHITE = 0xFFFFFFFFFFFFFFFFFFFF
+};
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_056.exp
--- a/tests/usr.bin/xlint/lint1/msg_056.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_056.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,2 @@
-msg_056.c(6): syntax error ':' [249]
+msg_056.c(7): warning: integer constant out of range [252]
+msg_056.c(8): warning: integral constant too large [56]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_057.c
--- a/tests/usr.bin/xlint/lint1/msg_057.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_057.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,14 @@
-/*     $NetBSD: msg_057.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_057.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_057.c"
 
 // Test for message: enumeration constant hides parameter: %s [57]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+long
+rgb(int red, int green, int blue)
+{
+       enum color {
+               red, green, blue
+       };
+
+       return red + green + blue;
+}
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_057.exp
--- a/tests/usr.bin/xlint/lint1/msg_057.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_057.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,6 @@
-msg_057.c(6): syntax error ':' [249]
+msg_057.c(10): warning: enumeration constant hides parameter: red [57]
+msg_057.c(10): warning: enumeration constant hides parameter: green [57]
+msg_057.c(11): warning: enumeration constant hides parameter: blue [57]
+msg_057.c(7): warning: argument red unused in function rgb [231]
+msg_057.c(7): warning: argument green unused in function rgb [231]
+msg_057.c(7): warning: argument blue unused in function rgb [231]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_060.c
--- a/tests/usr.bin/xlint/lint1/msg_060.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_060.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_060.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_060.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_060.c"
 
 // Test for message: void must be sole parameter [60]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+void example_1(void);
+void example_2(int, void);
+void example_3(void, void, void);
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_060.exp
--- a/tests/usr.bin/xlint/lint1/msg_060.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_060.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,4 @@
-msg_060.c(6): syntax error ':' [249]
+msg_060.c(7): void must be sole parameter [60]
+msg_060.c(8): void must be sole parameter [60]
+msg_060.c(8): void must be sole parameter [60]
+msg_060.c(8): void must be sole parameter [60]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_061.c
--- a/tests/usr.bin/xlint/lint1/msg_061.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_061.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,6 @@
-/*     $NetBSD: msg_061.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_061.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_061.c"
 
 // Test for message: void parameter cannot have name: %s [61]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+void example(void arg);
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_061.exp
--- a/tests/usr.bin/xlint/lint1/msg_061.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_061.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,1 @@
-msg_061.c(6): syntax error ':' [249]
+msg_061.c(6): void parameter cannot have name: arg [61]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_066.c
--- a/tests/usr.bin/xlint/lint1/msg_066.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_066.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_066.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_066.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_066.c"
 
 // Test for message: syntax requires ';' after last struct/union member [66]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+struct number {
+       int value
+};
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_066.exp
--- a/tests/usr.bin/xlint/lint1/msg_066.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_066.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,1 @@
-msg_066.c(6): syntax error ':' [249]
+msg_066.c(8): warning: syntax requires ';' after last struct/union member [66]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_068.c
--- a/tests/usr.bin/xlint/lint1/msg_068.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_068.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_068.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_068.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_068.c"
 
 // Test for message: typedef already qualified with '%s' [68]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+typedef const char const_char;
+
+const const_char twice_const;
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_068.exp
--- a/tests/usr.bin/xlint/lint1/msg_068.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_068.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,1 @@
-msg_068.c(6): syntax error ':' [249]
+msg_068.c(8): warning: typedef already qualified with 'const' [68]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_075.c
--- a/tests/usr.bin/xlint/lint1/msg_075.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_075.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,6 @@
-/*     $NetBSD: msg_075.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_075.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_075.c"
 
 // Test for message: overflow in hex escape [75]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+char str[] = "\x12345678123456781234567812345678";
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_075.exp
--- a/tests/usr.bin/xlint/lint1/msg_075.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_075.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,1 @@
-msg_075.c(6): syntax error ':' [249]
+msg_075.c(6): warning: overflow in hex escape [75]
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_081.c
--- a/tests/usr.bin/xlint/lint1/msg_081.c       Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_081.c       Fri Jan 08 21:25:03 2021 +0000
@@ -1,7 +1,8 @@
-/*     $NetBSD: msg_081.c,v 1.1 2021/01/02 10:22:43 rillig Exp $       */
+/*     $NetBSD: msg_081.c,v 1.2 2021/01/08 21:25:03 rillig Exp $       */
 # 3 "msg_081.c"
 
 // Test for message: \a undefined in traditional C [81]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+/* lint1-flags: -Stw */
+
+char str[] = "The bell\a rings";
diff -r 8f9b17315c5e -r 7a0a50466f16 tests/usr.bin/xlint/lint1/msg_081.exp
--- a/tests/usr.bin/xlint/lint1/msg_081.exp     Fri Jan 08 15:16:04 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_081.exp     Fri Jan 08 21:25:03 2021 +0000
@@ -1,1 +1,8 @@
-msg_081.c(6): syntax error ':' [249]
+(1): warning: 'long double' is illegal in traditional C [266]
+(1): warning: function prototypes are illegal in traditional C [270]
+(2): warning: 'long double' is illegal in traditional C [266]
+(2): warning: function prototypes are illegal in traditional C [270]



Home | Main Index | Thread Index | Old Index