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 tests/lint: add test for message 4...
details: https://anonhg.NetBSD.org/src/rev/c1c0f0a350cc
branches: trunk
changeset: 359998:c1c0f0a350cc
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Feb 07 02:39:10 2022 +0000
description:
tests/lint: add test for message 41 about bit-field in union
See PR toolchain/53219.
diffstat:
tests/usr.bin/xlint/lint1/msg_041.c | 9 ++++++---
tests/usr.bin/xlint/lint1/msg_041.exp | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r f8d0eaedeecf -r c1c0f0a350cc tests/usr.bin/xlint/lint1/msg_041.c
--- a/tests/usr.bin/xlint/lint1/msg_041.c Mon Feb 07 02:35:09 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_041.c Mon Feb 07 02:39:10 2022 +0000
@@ -1,7 +1,10 @@
-/* $NetBSD: msg_041.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
+/* $NetBSD: msg_041.c,v 1.3 2022/02/07 02:39:10 rillig Exp $ */
# 3 "msg_041.c"
// Test for message: illegal use of bit-field [41]
-TODO: "Add example code that triggers the above message." /* expect: 249 */
-TODO: "Add example code that almost triggers the above message."
+union u {
+ int member;
+ /* expect+1: illegal use of bit-field [41] */
+ unsigned bit_field : 7;
+};
diff -r f8d0eaedeecf -r c1c0f0a350cc tests/usr.bin/xlint/lint1/msg_041.exp
--- a/tests/usr.bin/xlint/lint1/msg_041.exp Mon Feb 07 02:35:09 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_041.exp Mon Feb 07 02:39:10 2022 +0000
@@ -1,1 +1,1 @@
-msg_041.c(6): error: syntax error ':' [249]
+msg_041.c(9): warning: illegal use of bit-field [41]
Home |
Main Index |
Thread Index |
Old Index