From: Alan Cox Date: Tue, 28 Jun 2016 18:56:04 +0000 (+0100) Subject: function: fix label clashes X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=3845f15553fc849bf6a7d6b790ea5eb51339ba19;p=FUZIX.git function: fix label clashes --- diff --git a/Applications/SmallC/function.c b/Applications/SmallC/function.c index ba56823d..917f58cd 100644 --- a/Applications/SmallC/function.c +++ b/Applications/SmallC/function.c @@ -16,7 +16,6 @@ int argtop; */ void newfunc(void) { char n[NAMESIZE]; - fexitlab = getlabel(); if (!symname(n)) { error("illegal function or declaration"); @@ -32,6 +31,9 @@ void newfunc_typed(int storage, char *n, int type) { int idx; SYMBOL *symbol; + + fexitlab = getlabel(); + if ((idx = find_global(n)) > -1) { symbol = &symbol_table[idx]; if (symbol->identity != FUNCTION)