__emit: Display proper argument type names in error messages for arguments of type 'local variable'
This commit is contained in:
parent
00e3e00327
commit
e93817be09
@ -6288,23 +6288,27 @@ static void SC_FASTCALL emit_param_local(emit_outval *p)
|
|||||||
} else {
|
} else {
|
||||||
sym=findglb(str,sSTATEVAR);
|
sym=findglb(str,sSTATEVAR);
|
||||||
if (sym==NULL) {
|
if (sym==NULL) {
|
||||||
undefined_sym:
|
|
||||||
error(17,str); /* undefined symbol */
|
error(17,str); /* undefined symbol */
|
||||||
return;
|
return;
|
||||||
} /* if */
|
} /* if */
|
||||||
markusage(sym,uREAD | uWRITTEN);
|
markusage(sym,uREAD | uWRITTEN);
|
||||||
if (sym->ident!=iCONSTEXPR)
|
if (sym->ident!=iCONSTEXPR) {
|
||||||
goto undefined_sym;
|
if (sym->ident==iFUNCTN || sym->ident==iREFFUNC)
|
||||||
|
tok=((sym->usage & uNATIVE)!=0) ? teNATIVE : teFUNCTN;
|
||||||
|
else
|
||||||
|
tok=teDATA;
|
||||||
|
goto invalid_token;
|
||||||
|
} /* if */
|
||||||
} /* if */
|
} /* if */
|
||||||
val=sym->addr;
|
val=sym->addr;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
invalid_token:
|
invalid_token:
|
||||||
emit_invalid_token(tSYMBOL,tok);
|
emit_invalid_token(teLOCAL,tok);
|
||||||
return;
|
return;
|
||||||
} /* switch */
|
} /* switch */
|
||||||
if ((val % sizeof(cell))==0)
|
if ((val % sizeof(cell))==0)
|
||||||
p->value.ucell = (ucell)val;
|
p->value.ucell=(ucell)val;
|
||||||
else
|
else
|
||||||
error(11); /* must be a multiple of cell size */
|
error(11); /* must be a multiple of cell size */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user