shithub: scc

Download patch

ref: c946d13235a8460a8c7f2aa86e705202d77231a7
parent: a901b27da57ae3df5a05f29b958104a55a10282b
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Jun 16 12:46:31 EDT 2022

tests/cc: Add 0208-sizeof.c

--- /dev/null
+++ b/tests/cc/execute/0208-sizeof.c
@@ -1,0 +1,9 @@
+#define LEN(a)   sizeof((a))/sizeof((a)[0])
+
+int
+main(void)
+{
+	char s[] = "bla";
+
+	return !(LEN(s) == 4);
+}
--- a/tests/cc/execute/scc-tests.lst
+++ b/tests/cc/execute/scc-tests.lst
@@ -198,3 +198,4 @@
 0205-cpparg.c
 0206-initializer.c
 0207-structcb.c
+0208-sizeof.c