Update the fix
This commit is contained in:
parent
6124e5e662
commit
ba64ad437e
@ -145,6 +145,7 @@ typedef struct s_symbol {
|
|||||||
struct s_symbol **refer; /* referrer list, functions that "use" this symbol */
|
struct s_symbol **refer; /* referrer list, functions that "use" this symbol */
|
||||||
int numrefers; /* number of entries in the referrer list */
|
int numrefers; /* number of entries in the referrer list */
|
||||||
char *documentation; /* optional documentation string */
|
char *documentation; /* optional documentation string */
|
||||||
|
int func_skipped;
|
||||||
} symbol;
|
} symbol;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3569,9 +3569,11 @@ static int newfunc(char *firstname,int firsttag,int fpublic,int fstatic,int stoc
|
|||||||
/* so it is not a prototype, proceed */
|
/* so it is not a prototype, proceed */
|
||||||
/* if this is a function that is not referred to (this can only be detected
|
/* if this is a function that is not referred to (this can only be detected
|
||||||
* in the second stage), shut code generation off */
|
* in the second stage), shut code generation off */
|
||||||
|
sym->func_skipped=FALSE;
|
||||||
if (sc_status==statWRITE && (sym->usage & uREAD)==0 && !fpublic) {
|
if (sc_status==statWRITE && (sym->usage & uREAD)==0 && !fpublic) {
|
||||||
sc_status=statSKIP;
|
sc_status=statSKIP;
|
||||||
cidx=code_idx;
|
cidx=code_idx;
|
||||||
|
sym->func_skipped=TRUE;
|
||||||
glbdecl=glb_declared;
|
glbdecl=glb_declared;
|
||||||
} /* if */
|
} /* if */
|
||||||
if ((sym->flags & flgDEPRECATED)!=0) {
|
if ((sym->flags & flgDEPRECATED)!=0) {
|
||||||
|
@ -1335,12 +1335,7 @@ static int command(void)
|
|||||||
/* mark function as "used" */
|
/* mark function as "used" */
|
||||||
/* do NOT mark it as written as that has a different meaning for
|
/* do NOT mark it as written as that has a different meaning for
|
||||||
* functions (marks them as "should return a value") */
|
* functions (marks them as "should return a value") */
|
||||||
|
if (!curfunc->func_skipped)
|
||||||
/* compute the number of references on the function */
|
|
||||||
for (count=0; count<curfunc->numrefers && curfunc->refer[count]; count++)
|
|
||||||
/* nothing */;
|
|
||||||
/* if there's references on the function or/and this function was declared as public */
|
|
||||||
if (count!=0 || (curfunc->usage & uPUBLIC)!=0)
|
|
||||||
markusage(sym,uREAD);
|
markusage(sym,uREAD);
|
||||||
} else {
|
} else {
|
||||||
outval(sym->addr,FALSE);
|
outval(sym->addr,FALSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user