Prevent SET from overriding constant symbols

Fixes #341
This commit is contained in:
ISSOtm
2019-08-27 21:07:42 +02:00
parent e33e6e2413
commit e3e18063c6
5 changed files with 37 additions and 0 deletions

View File

@@ -553,6 +553,11 @@ void sym_AddSet(char *tzSym, int32_t value)
tzSym,
nsym->tzFileName,
nsym->nFileLine);
else if (!(nsym->nType & SYMF_SET))
yyerror("'%s' already defined as constant at %s(%u)",
tzSym,
nsym->tzFileName,
nsym->nFileLine);
} else if (nsym->nType & SYMF_REF) {
yyerror("'%s' already referenced at %s(%u)",
tzSym,