Module Name: src
Committed By: rillig
Date: Sat Mar 20 17:08:08 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.22 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.23
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.22 Sat Feb 27 17:16:48 2021
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Sat Mar 20 17:08:08 2021
@@ -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 @@ do_while_true(void)
} while (__lint_true); /* expect: 161 */
}
+
+void
+initialization(void)
+{
+ struct {
+ _Bool b;
+ } var[] = {
+ { __lint_false },
+ { __lint_true },
+ { 0 }, /* FIXME: type mismatch */
+ { 1 }, /* FIXME: type mismatch */
+ };
+}