mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +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, '.');
|
char *localPtr = strchr(tzSym, '.');
|
||||||
|
|
||||||
if (localPtr != NULL) {
|
if (localPtr != NULL) {
|
||||||
if (!pScope)
|
if (!pScope) {
|
||||||
fatalerror("Local label in main scope");
|
yyerror("Local label in main scope");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct sSymbol *parent = pScope->pScope ?
|
struct sSymbol *parent = pScope->pScope ?
|
||||||
pScope->pScope : pScope;
|
pScope->pScope : pScope;
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
ERROR: local-without-parent.asm(2):
|
ERROR: local-without-parent.asm(2):
|
||||||
Local label '.test' in main scope
|
Local label '.test' in main scope
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
|
|||||||
Reference in New Issue
Block a user