Merge pull request #437 from rednex/locals

Prevent local symbols that are not labels
This commit is contained in:
Eldred Habert
2020-02-26 02:56:35 +01:00
committed by GitHub
5 changed files with 46 additions and 20 deletions

View File

@@ -40,6 +40,6 @@ ENDM
test_char _
test_char @
test_char #
test_char .
test_char .
test_char :

View File

@@ -1,5 +1,7 @@
ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
Label "sizeof_" created outside of a SECTION
ERROR: label-macro-arg.asm(44) -> label-macro-arg.asm::test_char(31):
Local label in main scope
while expanding symbol "VAR_DEF"
ERROR: label-macro-arg.asm(45) -> label-macro-arg.asm::test_char(31):
Macro 'something' not defined
ERROR: label-macro-arg.asm(44) -> label-macro-arg.asm::test_char(31):
syntax error
while expanding symbol "VAR_DEF"
error: Assembly aborted (2 errors)!

View File

@@ -5,4 +5,3 @@ $8
sizeof__something equals $1
sizeof_@something equals $1
sizeof_#something equals $1
sizeof_.something equals $1