Files
rgbds/test/asm/anon-label-bad.err
T
Rangi fe3b238dea 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.
2026-07-06 16:18:42 -04:00

12 lines
488 B
Plaintext

error: Cannot define label `!0` outside of a `SECTION`
at anon-label-bad.asm(2)
error: Reference to anonymous label 2 before, when only 1 has been created so far
at anon-label-bad.asm(6)
error: syntax error, unexpected anonymous label
at anon-label-bad.asm(9)
error: syntax error, unexpected anonymous label, expecting symbol or label or local label
at anon-label-bad.asm(10)
error: syntax error, unexpected ::
at anon-label-bad.asm(22)
Assembly aborted with 5 errors