diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 365d486..64db1c0 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -6220,8 +6220,6 @@ static void SC_FASTCALL emit_param_data(emit_outval *p) p->type=eotNUMBER; tok=lex(&val,&str); switch (tok) { - case tNUMBER: - break; case tSYMBOL: sym=findloc(str); if (sym!=NULL) { @@ -6230,8 +6228,8 @@ static void SC_FASTCALL emit_param_data(emit_outval *p) tok=tLABEL; goto invalid_token; } /* if */ - if (sym->vclass!=sSTATIC && sym->ident!=iCONSTEXPR) { - tok=teLOCAL; + if (sym->vclass!=sSTATIC) { + tok=(sym->ident==iCONSTEXPR) ? teNUMERIC : teLOCAL; goto invalid_token; } /* if */ } else { @@ -6245,6 +6243,10 @@ static void SC_FASTCALL emit_param_data(emit_outval *p) tok=((sym->usage & uNATIVE)!=0) ? teNATIVE : teFUNCTN; goto invalid_token; } /* if */ + if (sym->ident==iCONSTEXPR) { + tok=teNUMERIC; + goto invalid_token; + } /* if */ } /* if */ val=sym->addr; break;