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: update comment to reality



details:   https://anonhg.NetBSD.org/src/rev/e4aa6c10cb41
branches:  trunk
changeset: 359668:e4aa6c10cb41
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 16 08:40:31 2022 +0000

description:
tests/lint: update comment to reality

diffstat:

 tests/usr.bin/xlint/lint1/d_c99_bool.c   |   7 ++++---
 tests/usr.bin/xlint/lint1/d_c99_bool.exp |  12 ++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diffs (40 lines):

diff -r 9a5527c848fb -r e4aa6c10cb41 tests/usr.bin/xlint/lint1/d_c99_bool.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool.c    Sat Jan 15 23:21:34 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool.c    Sun Jan 16 08:40:31 2022 +0000
@@ -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 @@
  * 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];
diff -r 9a5527c848fb -r e4aa6c10cb41 tests/usr.bin/xlint/lint1/d_c99_bool.exp
--- a/tests/usr.bin/xlint/lint1/d_c99_bool.exp  Sat Jan 15 23:21:34 2022 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool.exp  Sun Jan 16 08:40:31 2022 +0000
@@ -3,9 +3,9 @@
 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]



Home | Main Index | Thread Index | Old Index