Update fix

Signed-off-by: VVWVV <d0u61ev@gmail.com>
This commit is contained in:
VVWVV 2017-07-29 22:12:58 +03:00
parent 284bbc1a12
commit e0d5c1dc6a
3 changed files with 1 additions and 4 deletions

View File

@ -145,7 +145,6 @@ typedef struct s_symbol {
struct s_symbol **refer; /* referrer list, functions that "use" this symbol */
int numrefers; /* number of entries in the referrer list */
char *documentation; /* optional documentation string */
int func_skipped;
} symbol;

View File

@ -3569,11 +3569,9 @@ static int newfunc(char *firstname,int firsttag,int fpublic,int fstatic,int stoc
/* so it is not a prototype, proceed */
/* if this is a function that is not referred to (this can only be detected
* in the second stage), shut code generation off */
sym->func_skipped=FALSE;
if (sc_status==statWRITE && (sym->usage & uREAD)==0 && !fpublic) {
sc_status=statSKIP;
cidx=code_idx;
sym->func_skipped=TRUE;
glbdecl=glb_declared;
} /* if */
if ((sym->flags & flgDEPRECATED)!=0) {

View File

@ -1333,7 +1333,7 @@ static int command(void)
/* mark function as "used" */
/* do NOT mark it as written as that has a different meaning for
* functions (marks them as "should return a value") */
if (!curfunc->func_skipped)
if (sc_status!=statSKIP)
markusage(sym,uREAD);
} else {
outval(sym->addr,FALSE);