mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-01 19:38:43 +00:00
Do not allow defining labels outside sections (#2013)
Creating a `Symbol` with `type = SYM_LABEL` but `section = nullptr` is inconsistent and dangerous. I was not able to cause any buggy behavior so far, but it's safer and reasonable to not create such a symbol in the first place. The main consequence is that `DEF(LabelOutsideSection)` will now evaluate as 0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
error: Label `DisallowedContent` created outside of a `SECTION`
|
||||
error: Cannot define label `DisallowedContent` outside of a `SECTION`
|
||||
at pops-restore-no-section.asm(9)
|
||||
error: Cannot output data outside of a `SECTION`
|
||||
at pops-restore-no-section.asm(10)
|
||||
|
||||
Reference in New Issue
Block a user