ref: 4e8b34f42edef9a3ad5de95f3cb79132dad04c46
parent: 5014f55c482c4c45f7bf09cb6a5a4aa37ffdb04f
author: ISSOtm <eldredhabert0@gmail.com>
date: Mon Jan 20 19:19:58 EST 2020
Improve error message when a symbol is not constant
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -269,7 +269,7 @@
if (sym_IsConstant(psym))
return getvaluefield(psym);
- fatalerror("Expression must have a constant value");
+ fatalerror("\"%s\" does not have a constant value", s);
}
yyerror("'%s' not defined", s);
--- a/test/asm/bracketed-symbols.err
+++ b/test/asm/bracketed-symbols.err
@@ -1,4 +1,4 @@
ERROR: bracketed-symbols.asm(16):
Print types are only allowed for numbers
ERROR: bracketed-symbols.asm(20):
- Expression must have a constant value
+ "Label" does not have a constant value