Update a symbol's filename and line when defined

Currently, all symbols are assigned a filename and line when they're
first encountered and added to the internal hash table. This is often
not expected and leads to erroneous error messages.
This commit is contained in:
mid-kid
2019-01-12 12:57:58 +01:00
parent 4b40d63dfd
commit d07ba6971b
3 changed files with 29 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
SECTION "sec", ROM0
dw Sym
m: MACRO
Sym::
ENDM
m
Sym::

View File

@@ -0,0 +1,3 @@
ERROR: label-redefinition.asm(7):
'Sym' already defined in m(6)
error: Assembly aborted in pass 1 (1 errors)!