Module Name:    src
Committed By:   rillig
Date:           Thu Nov 25 18:10:23 UTC 2021

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

Log Message:
tests/indent: demonstrate 'sizeof(int) *expr' (since 2021-11-25)

Broken in indent-2021.11.25.16.41.33, while fixing the spacing around
'*' in declarations.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/lsym_sizeof.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/lsym_sizeof.c
diff -u src/tests/usr.bin/indent/lsym_sizeof.c:1.1 src/tests/usr.bin/indent/lsym_sizeof.c:1.2
--- src/tests/usr.bin/indent/lsym_sizeof.c:1.1	Thu Nov 18 21:19:19 2021
+++ src/tests/usr.bin/indent/lsym_sizeof.c	Thu Nov 25 18:10:23 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_sizeof.c,v 1.1 2021/11/18 21:19:19 rillig Exp $ */
+/* $NetBSD: lsym_sizeof.c,v 1.2 2021/11/25 18:10:23 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -15,3 +15,19 @@
 #indent end
 
 #indent run-equals-input
+
+
+/*
+ * After 'sizeof', a type name in parentheses does not start a cast
+ * expression.
+ *
+ * Broken since lexi.c 1.156 from 2021-11-25.
+ */
+#indent input
+char str[sizeof(int) * CHAR_BIT + 1];
+#indent end
+
+/* FIXME: The '*' must be a binary operator here. */
+#indent run -di0
+char str[sizeof(int) *CHAR_BIT + 1];
+#indent end

Reply via email to