mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 11:32:07 +00:00
Consistently handle auto-scoping of local symbols
This commit is contained in:
3
test/asm/empty-local-purged.asm
Normal file
3
test/asm/empty-local-purged.asm
Normal file
@@ -0,0 +1,3 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
PURGE .test
|
||||
2
test/asm/empty-local-purged.err
Normal file
2
test/asm/empty-local-purged.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: empty-local-purged.asm(3):
|
||||
Unqualified local label '.test' in main scope
|
||||
3
test/asm/empty-local-referenced.asm
Normal file
3
test/asm/empty-local-referenced.asm
Normal file
@@ -0,0 +1,3 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
dw Referenced.
|
||||
2
test/asm/empty-local-referenced.err
Normal file
2
test/asm/empty-local-referenced.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: empty-local-referenced.asm(3):
|
||||
'Referenced.' is a nonsensical reference to an empty local label
|
||||
4
test/asm/empty-local-used.asm
Normal file
4
test/asm/empty-local-used.asm
Normal file
@@ -0,0 +1,4 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
Label:
|
||||
dw Label.
|
||||
2
test/asm/empty-local-used.err
Normal file
2
test/asm/empty-local-used.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: empty-local-used.asm(4):
|
||||
'Label.' is a nonsensical reference to an empty local label
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
SECTION "Test", ROM0
|
||||
|
||||
Label:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FATAL: empty-local.asm(5):
|
||||
FATAL: empty-local.asm(4):
|
||||
'Label.' is a nonsensical reference to an empty local label
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SECTION "sec", ROM0
|
||||
SECTION "Test", ROM0
|
||||
|
||||
dw .test
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FATAL: local-ref-without-parent.asm(3):
|
||||
Local label reference '.test' in main scope
|
||||
Unqualified local label '.test' in main scope
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
.test:
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
error: local-without-parent.asm(2):
|
||||
FATAL: local-without-parent.asm(3):
|
||||
Unqualified local label '.test' in main scope
|
||||
error: Assembly aborted (1 error)!
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FATAL: nested-local-reference.asm(8):
|
||||
'Parent.child.grandchild' is a nonsensical reference to a nested local symbol
|
||||
'Parent.child.grandchild' is a nonsensical reference to a nested local label
|
||||
|
||||
Reference in New Issue
Block a user