In the line
@add #strings_offset #code_offset -> val;
The first sysconstant #strings_offset is parsed correctly, but the second #code_offset is erroneously read as a regular symbol code_offset. This then generates a "No such constant" error.
I think the problem is that when the first operand is parsed (parse_operand_z() at asm.c:3601), the lexer looks ahead to the # token. Lexing this eats two tokens (expressp.c:380), but we then only put one back.
Really we could run into this problem any time a system constant follows another value with no delimiter. For example:
Array arr --> 1 2 #strings_offset 3 4;
You can work around the problem by writing the system constant in parens.
@add #strings_offset (#code_offset) -> val;
In the line
The first sysconstant
#strings_offsetis parsed correctly, but the second#code_offsetis erroneously read as a regular symbolcode_offset. This then generates a "No such constant" error.I think the problem is that when the first operand is parsed (parse_operand_z() at asm.c:3601), the lexer looks ahead to the
#token. Lexing this eats two tokens (expressp.c:380), but we then only put one back.Really we could run into this problem any time a system constant follows another value with no delimiter. For example:
You can work around the problem by writing the system constant in parens.