RISC-V: avoid redundant and misleading/wrong error messages
authorJan Beulich <jbeulich@suse.com>
Tue, 25 Apr 2023 09:16:44 +0000 (11:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Apr 2023 09:16:44 +0000 (11:16 +0200)
commita5e756e63e170cf69e06be98287528760833aad5
treec010397cb5e728e61cc5626fdcaa9135226dee39
parent408ab0161d09ff29e258c8ff1bb02ec5e084087c
RISC-V: avoid redundant and misleading/wrong error messages

The use of a wrong (for the insn) relocation operator (or a future one
which simply isn't recognized by older gas yet) doesn't render the (rest
of the) expression "bad". Furthermore alongside the error from
expression() in most cases the parser would emit another error then
anyway. Suppress the call to my_getExpression() in such a case,
arranging for a guaranteed subsequent error message by marking the
expression "illegal".
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/tprel-add.l