From d953a50de1e5d3b19df5548461a271b5d9d755ed Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 16 Nov 2017 23:55:49 +0000 Subject: [PATCH] function: allow struct * but not struct arguments --- Applications/SmallC/function.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Applications/SmallC/function.c b/Applications/SmallC/function.c index a4f4bd88..1ff456eb 100644 --- a/Applications/SmallC/function.c +++ b/Applications/SmallC/function.c @@ -196,6 +196,10 @@ void doLocalAnsiArgument(int type) { if (match("*")) { identity = POINTER; } else { + if (type == STRUCT) { + error("cannot pass struct"); + return; + } identity = VARIABLE; if (type == VOID) return; -- 2.34.1