Fix bug where macro names can be treated as numeric symbols (#1653)

This commit is contained in:
Rangi
2025-02-08 23:03:21 +01:00
committed by GitHub
parent 4c916b8da8
commit 177a3abfac
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
MACRO mac
ENDM
DEF n EQU mac
DEF v = 2 + mac
DEF k RB mac * 2
SECTION "test", ROM0
db mac
dw 2 + mac
dl mac * 2

View File

@@ -0,0 +1,13 @@
error: non-numeric-symbol.asm(4):
'mac' is not a numeric symbol
error: non-numeric-symbol.asm(5):
'mac' is not a numeric symbol
error: non-numeric-symbol.asm(6):
'mac' is not a numeric symbol
error: non-numeric-symbol.asm(9):
'mac' is not a numeric symbol
error: non-numeric-symbol.asm(10):
'mac' is not a numeric symbol
error: non-numeric-symbol.asm(11):
'mac' is not a numeric symbol
error: Assembly aborted (6 errors)!