Module Name:    src
Committed By:   rillig
Date:           Sun Oct 31 19:08:39 UTC 2021

Modified Files:
        src/tests/usr.bin/indent: fmt_decl.c

Log Message:
tests/indent: test support for ancient initialization without '='


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/indent/fmt_decl.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/indent/fmt_decl.c
diff -u src/tests/usr.bin/indent/fmt_decl.c:1.9 src/tests/usr.bin/indent/fmt_decl.c:1.10
--- src/tests/usr.bin/indent/fmt_decl.c:1.9	Sun Oct 31 17:22:48 2021
+++ src/tests/usr.bin/indent/fmt_decl.c	Sun Oct 31 19:08:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fmt_decl.c,v 1.9 2021/10/31 17:22:48 rillig Exp $	*/
+/*	$NetBSD: fmt_decl.c,v 1.10 2021/10/31 19:08:39 rillig Exp $	*/
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
 
 /* See FreeBSD r303570 */
@@ -431,3 +431,23 @@ main(void)
 	char *(*	f2)();
 }
 #indent end
+
+
+/*
+ * In some ancient time long before ISO C90, variable declarations with
+ * initializer could be written without '='. The C Programming Language from
+ * 1978 doesn't mention this form anymore.
+ */
+#indent input
+int a - 1;
+{
+int a - 1;
+}
+#indent end
+
+#indent run -di0
+int a -1;
+{
+	int a -1;
+}
+#indent end

Reply via email to