ref: e941cafedb46bc89e5e699bc9a462d8564085b1a
parent: 03fe077b41ae81d240e2c467bdf7275d57b3c462
author: ISSOtm <[email protected]>
date: Tue Feb 18 13:36:59 EST 2020
Make locals in main scope a non-fatal error
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -540,8 +540,10 @@
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;
--- a/test/asm/local-without-parent.err
+++ b/test/asm/local-without-parent.err
@@ -1,2 +1,3 @@
ERROR: local-without-parent.asm(2):
Local label '.test' in main scope
+error: Assembly aborted (1 errors)!