mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Make locals in main scope a non-fatal error
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
ERROR: local-without-parent.asm(2):
|
||||
Local label '.test' in main scope
|
||||
error: Assembly aborted (1 errors)!
|
||||
|
||||
Reference in New Issue
Block a user