Module Name: src Committed By: rillig Date: Sun Jan 16 08:40:31 UTC 2022
Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool.c d_c99_bool.exp Log Message: tests/lint: update comment to reality To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/d_c99_bool.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_c99_bool.exp 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.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.8 src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.9 --- src/tests/usr.bin/xlint/lint1/d_c99_bool.c:1.8 Sat Jan 15 14:22:03 2022 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool.c Sun Jan 16 08:40:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool.c,v 1.8 2022/01/15 14:22:03 rillig Exp $ */ +/* $NetBSD: d_c99_bool.c,v 1.9 2022/01/16 08:40:31 rillig Exp $ */ # 3 "d_c99_bool.c" /* @@ -36,8 +36,9 @@ int null_pointer_converts_to_true_[(_Boo * expression. This goes against C99 6.6p7 but is probably not too relevant * in practice. * - * The call to constant(tn, 0) defaults to 1, then. This is why neither of - * the following array declarations generates an error message. + * In such a case, to_int_constant(tn, false) in cgram.y:array_size_opt + * returns 1 for the array size. This is why neither of the following array + * declarations generates an error message. */ char ch; int nonnull_pointer_converts_to_false[(_Bool)&ch ? -1 : 1]; Index: src/tests/usr.bin/xlint/lint1/d_c99_bool.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool.exp:1.7 src/tests/usr.bin/xlint/lint1/d_c99_bool.exp:1.8 --- src/tests/usr.bin/xlint/lint1/d_c99_bool.exp:1.7 Sat Jan 15 14:22:03 2022 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool.exp Sun Jan 16 08:40:31 2022 @@ -3,9 +3,9 @@ d_c99_bool.c(19): error: negative array d_c99_bool.c(23): error: negative array dimension (-1) [20] d_c99_bool.c(27): error: negative array dimension (-1) [20] d_c99_bool.c(32): error: negative array dimension (-1) [20] -d_c99_bool.c(47): error: negative array dimension (-1) [20] -d_c99_bool.c(51): error: negative array dimension (-1) [20] -d_c99_bool.c(56): error: negative array dimension (-1) [20] -d_c99_bool.c(60): error: negative array dimension (-1) [20] -d_c99_bool.c(64): error: negative array dimension (-1) [20] -d_c99_bool.c(68): error: negative array dimension (-1) [20] +d_c99_bool.c(48): error: negative array dimension (-1) [20] +d_c99_bool.c(52): error: negative array dimension (-1) [20] +d_c99_bool.c(57): error: negative array dimension (-1) [20] +d_c99_bool.c(61): error: negative array dimension (-1) [20] +d_c99_bool.c(65): error: negative array dimension (-1) [20] +d_c99_bool.c(69): error: negative array dimension (-1) [20]