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: revert test for message 11



details:   https://anonhg.NetBSD.org/src/rev/463499c65c1e
branches:  trunk
changeset: 958488:463499c65c1e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Jan 07 19:11:58 2021 +0000

description:
lint: revert test for message 11

That test only produced other messages, but not message 11.

diffstat:

 tests/usr.bin/xlint/lint1/msg_011.c   |  23 +++--------------------
 tests/usr.bin/xlint/lint1/msg_011.exp |   7 +------
 2 files changed, 4 insertions(+), 26 deletions(-)

diffs (42 lines):

diff -r 20c14612173a -r 463499c65c1e tests/usr.bin/xlint/lint1/msg_011.c
--- a/tests/usr.bin/xlint/lint1/msg_011.c       Thu Jan 07 18:37:41 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_011.c       Thu Jan 07 19:11:58 2021 +0000
@@ -1,24 +1,7 @@
-/*     $NetBSD: msg_011.c,v 1.2 2021/01/07 18:37:41 rillig Exp $       */
+/*     $NetBSD: msg_011.c,v 1.3 2021/01/07 19:11:58 rillig Exp $       */
 # 3 "msg_011.c"
 
 // Test for message: bit-field initializer out of range [11]
 
-struct example {
-       int bit_field: 4;
-} example_var[] = {
-    { 2 },
-    { 1 + 1 },
-    { 1ULL << 40 },
-    { 1LL << 40 },
-    { -16 - 1 },
-};
-
-struct example_u {
-       unsigned int bit_field: 4;
-} example_var_u[] = {
-    { 2 },
-    { 1 + 1 },
-    { 1ULL << 40 },
-    { 1LL << 40 },
-    { -16 - 1 },
-};
+TODO: "Add example code that triggers the above message."
+TODO: "Add example code that almost triggers the above message."
diff -r 20c14612173a -r 463499c65c1e tests/usr.bin/xlint/lint1/msg_011.exp
--- a/tests/usr.bin/xlint/lint1/msg_011.exp     Thu Jan 07 18:37:41 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_011.exp     Thu Jan 07 19:11:58 2021 +0000
@@ -1,6 +1,1 @@
-msg_011.c(11): warning: bit-field initializer does not fit [180]
-msg_011.c(12): warning: bit-field initializer does not fit [180]
-msg_011.c(13): warning: bit-field initializer does not fit [180]
-msg_011.c(21): warning: bit-field initializer does not fit [180]
-msg_011.c(22): warning: bit-field initializer does not fit [180]
-msg_011.c(23): warning: initialisation of unsigned with negative constant [221]
+msg_011.c(6): syntax error ':' [249]



Home | Main Index | Thread Index | Old Index