From 4c798112bd4884d4f777f36cc9ad5990eede2957 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Sun, 25 Nov 2018 01:25:05 +0700 Subject: [PATCH] __emit: Don't mark functions as uWRITTEN --- source/compiler/sc1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 3b4f6c8..7e6b920 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -6238,7 +6238,7 @@ static void SC_FASTCALL emit_param_data(emit_outval *p) error(17,str); /* undefined symbol */ return; } /* if */ - markusage(sym,uREAD | uWRITTEN); + markusage(sym,(sym->ident==iFUNCTN || sym->ident==iREFFUNC) ? uREAD : (uREAD | uWRITTEN)); if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) { tok=((sym->usage & uNATIVE)!=0) ? teNATIVE : teFUNCTN; goto invalid_token; @@ -6291,7 +6291,7 @@ static void SC_FASTCALL emit_param_local(emit_outval *p) error(17,str); /* undefined symbol */ return; } /* if */ - markusage(sym,uREAD | uWRITTEN); + markusage(sym,(sym->ident==iFUNCTN || sym->ident==iREFFUNC) ? uREAD : (uREAD | uWRITTEN)); if (sym->ident!=iCONSTEXPR) { if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) tok=((sym->usage & uNATIVE)!=0) ? teNATIVE : teFUNCTN;