Improve error message when a symbol is not constant

This commit is contained in:
ISSOtm
2020-01-21 00:19:58 +01:00
parent 5014f55c48
commit 4e8b34f42e
2 changed files with 2 additions and 2 deletions

View File

@@ -269,7 +269,7 @@ uint32_t sym_GetConstantValue(char const *s)
if (sym_IsConstant(psym)) if (sym_IsConstant(psym))
return getvaluefield(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); yyerror("'%s' not defined", s);

View File

@@ -1,4 +1,4 @@
ERROR: bracketed-symbols.asm(16): ERROR: bracketed-symbols.asm(16):
Print types are only allowed for numbers Print types are only allowed for numbers
ERROR: bracketed-symbols.asm(20): ERROR: bracketed-symbols.asm(20):
Expression must have a constant value "Label" does not have a constant value