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: fix test for GCC bit-f...



details:   https://anonhg.NetBSD.org/src/rev/20e76ae91f8c
branches:  trunk
changeset: 1021020:20e76ae91f8c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun May 02 21:47:28 2021 +0000

description:
tests/lint: fix test for GCC bit-field types

The whole purpose of this test is to try the message about invalid
bit-field types in GCC mode.  Therefore, use the default lint1-flags
that include -g.

diffstat:

 tests/usr.bin/xlint/lint1/gcc_bit_field_types.c   |   8 +-------
 tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp |  10 +++++-----
 2 files changed, 6 insertions(+), 12 deletions(-)

diffs (36 lines):

diff -r 15b85dc8b03f -r 20e76ae91f8c tests/usr.bin/xlint/lint1/gcc_bit_field_types.c
--- a/tests/usr.bin/xlint/lint1/gcc_bit_field_types.c   Sun May 02 21:37:32 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/gcc_bit_field_types.c   Sun May 02 21:47:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gcc_bit_field_types.c,v 1.1 2021/05/02 21:22:09 rillig Exp $   */
+/*     $NetBSD: gcc_bit_field_types.c,v 1.2 2021/05/02 21:47:28 rillig Exp $   */
 # 3 "gcc_bit_field_types.c"
 
 /*
@@ -10,12 +10,6 @@
  * See msg_035.c.
  */
 
-// Test for message: illegal bit-field type '%s' [35]
-
-/* Omit -g, see gcc_bit_field_types.c. */
-/* lint1-flags: -Sw */
-
-/* Try all types from tspec_t. */
 struct example {
        int int_flag: 1;
        unsigned int unsigned_int_flag: 1;
diff -r 15b85dc8b03f -r 20e76ae91f8c tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp
--- a/tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp Sun May 02 21:37:32 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/gcc_bit_field_types.exp Sun May 02 21:47:28 2021 +0000
@@ -1,5 +1,5 @@
-gcc_bit_field_types.c(22): warning: illegal bit-field type 'long' [35]
-gcc_bit_field_types.c(23): warning: illegal bit-field type 'unsigned long' [35]
-gcc_bit_field_types.c(24): warning: illegal bit-field type 'long long' [35]
-gcc_bit_field_types.c(25): warning: illegal bit-field type 'unsigned long long' [35]
-gcc_bit_field_types.c(26): warning: illegal bit-field type 'double' [35]
+gcc_bit_field_types.c(16): warning: illegal bit-field type 'long' [35]
+gcc_bit_field_types.c(17): warning: illegal bit-field type 'unsigned long' [35]
+gcc_bit_field_types.c(18): warning: illegal bit-field type 'long long' [35]
+gcc_bit_field_types.c(19): warning: illegal bit-field type 'unsigned long long' [35]
+gcc_bit_field_types.c(20): warning: illegal bit-field type 'double' [35]



Home | Main Index | Thread Index | Old Index