Module Name: src
Committed By: rillig
Date: Sun Mar 21 10:43:08 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: msg_174.c
Log Message:
tests/lint: clarify that a brace-enclosed initializer needs an expr
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_174.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/msg_174.c
diff -u src/tests/usr.bin/xlint/lint1/msg_174.c:1.3 src/tests/usr.bin/xlint/lint1/msg_174.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_174.c:1.3 Sun Jan 31 11:12:07 2021
+++ src/tests/usr.bin/xlint/lint1/msg_174.c Sun Mar 21 10:43:08 2021
@@ -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 @@ example(void)
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 = {};
}