Make locals in main scope a non-fatal error

This commit is contained in:
ISSOtm
2020-02-18 18:36:59 +01:00
parent 03fe077b41
commit e941cafedb
2 changed files with 5 additions and 2 deletions

View File

@@ -540,8 +540,10 @@ void sym_AddReloc(char const *tzSym)
char *localPtr = strchr(tzSym, '.');
if (localPtr != NULL) {
if (!pScope)
fatalerror("Local label in main scope");
if (!pScope) {
yyerror("Local label in main scope");
return;
}
struct sSymbol *parent = pScope->pScope ?
pScope->pScope : pScope;

View File

@@ -1,2 +1,3 @@
ERROR: local-without-parent.asm(2):
Local label '.test' in main scope
error: Assembly aborted (1 errors)!