[PATCH] as: fix bpf expression parsing regression
Nick Clifton
nickc@redhat.com
Mon Feb 19 11:16:46 GMT 2024
Hi Will,
> As a result of a switch instead of an if, as would issue non-specific
> error messages when it encountered an operand it could not parse in bpf.
> This patch fixes that regression and adds a test to prevent it from
> reoccurring.
>
> Tested for bpf-unknown-none on x86_64-redhat-linux.
Approved - please apply.
> - switch (exp->X_op == O_absent || exp_parse_failed)
> + if (exp->X_op == O_absent || exp_parse_failed)
> return NULL;
I have to say that I am surprised that the original version of this
code compiled at all. Or at least compiled without generating any
kind of warning message.
Cheers
Nick
More information about the Binutils
mailing list