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: clarify that a brace-e...



details:   https://anonhg.NetBSD.org/src/rev/346d3630cba5
branches:  trunk
changeset: 953808:346d3630cba5
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 21 10:43:08 2021 +0000

description:
tests/lint: clarify that a brace-enclosed initializer needs an expr

diffstat:

 tests/usr.bin/xlint/lint1/msg_174.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r ff06448c9345 -r 346d3630cba5 tests/usr.bin/xlint/lint1/msg_174.c
--- a/tests/usr.bin/xlint/lint1/msg_174.c       Sun Mar 21 10:30:28 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_174.c       Sun Mar 21 10:43:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_174.c,v 1.3 2021/01/31 11:12:07 rillig Exp $       */
+/*     $NetBSD: msg_174.c,v 1.4 2021/03/21 10:43:08 rillig Exp $       */
 # 3 "msg_174.c"
 
 // Test for message: too many initializers [174]
@@ -11,6 +11,9 @@
 
        int too_many = { 17, 19 };      /* expect: 174 */
 
-       /* XXX: Double-check with C99, this might be allowed. */
+       /*
+        * An initializer list must have at least one expression, says the
+        * syntax definition in C99 6.7.8.
+        */
        int too_few = {};
 }



Home | Main Index | Thread Index | Old Index