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: test initialization in...



details:   https://anonhg.NetBSD.org/src/rev/854a51ce8b07
branches:  trunk
changeset: 953776:854a51ce8b07
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Mar 20 17:08:08 2021 +0000

description:
tests/lint: test initialization in strict bool mode

I somehow forgot to list INIT as one of the operators in
is_assignment_bool_or_other.

diffstat:

 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r fc9b0b3c014a -r 854a51ce8b07 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Sat Mar 20 16:16:32 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Sat Mar 20 17:08:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_bool_strict.c,v 1.22 2021/02/27 17:16:48 rillig Exp $    */
+/*     $NetBSD: d_c99_bool_strict.c,v 1.23 2021/03/20 17:08:08 rillig Exp $    */
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -756,3 +756,16 @@
 
        } while (__lint_true);  /* expect: 161 */
 }
+
+void
+initialization(void)
+{
+       struct {
+               _Bool b;
+       } var[] = {
+           { __lint_false },
+           { __lint_true },
+           { 0 },              /* FIXME: type mismatch */
+           { 1 },              /* FIXME: type mismatch */
+       };
+}



Home | Main Index | Thread Index | Old Index