aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-18 11:09:17 +0200
committerlemon <lsof@mailbox.org>2026-04-18 11:09:17 +0200
commit970508c5221f930937021203107ecbac5ac9960c (patch)
treec6ec98e89e48331cf20adf5db4742e4155e7686a /test
parente9b132ef171114b0384ef30d6630db22d2b47e5d (diff)
c: fix some compatible type declarations
When K&R prototypes are present, definition of compatible types and composite types becomes recursive. For example `int f(int (*)())` should be compatible with `int f(int (*)(int))` etc
Diffstat (limited to 'test')
-rw-r--r--test/22-decl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/22-decl.c b/test/22-decl.c
new file mode 100644
index 0000000..ddb1a57
--- /dev/null
+++ b/test/22-decl.c
@@ -0,0 +1,13 @@
+/* EXPECT:
+*/
+
+void f(int (*)());
+void f(int (*)(int));
+void f(int (*)());
+int a[];
+int a[100];
+int a[];
+
+int main() {
+}
+