shithub: scc

Download patch

ref: 47d23949f797eeb99110bfad4cac4fbddc0081e0
parent: 505471768e8e83bfe42d1884dcd7ab038f06a6cc
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 24 11:30:09 EDT 2018

[tests/scc] Add test 0180-incomplete.c

This test checks that a pointer to an incomplete type declared
using the array syntax is correctly parsed. Some compilers are
detected to generate an error because they considerer the
pointer as an array of incomplete type.

--- /dev/null
+++ b/tests/scc/execute/0180-incomplete.c
@@ -1,0 +1,14 @@
+
+struct dummy;
+
+void *
+fun(struct dummy p[])
+{
+	return p;
+}
+
+int
+main()
+{
+	return fun(0) != 0;
+}
--- a/tests/scc/execute/scc-tests.lst
+++ b/tests/scc/execute/scc-tests.lst
@@ -170,3 +170,4 @@
 0177-literal.c [TODO]
 0178-include.c [TODO]
 0179-sizeof.c [TODO]
+0180-incomplete.c