[PATCH] opcodes/riscv: make riscv_options[] const
Nelson Chu
nelson@rivosinc.com
Tue Jul 29 02:54:46 GMT 2025
Looks reasonable to me, thanks :-)
Nelson
On Tue, Jul 29, 2025 at 12:09 AM Jan Beulich <jbeulich@suse.com> wrote:
> There's no reason to allow the array to be modifiable. In fact the
> compiler is able to infer this, placing the array in .data.rel.ro, but
> let's make it explicit.
>
> --- a/opcodes/riscv-dis.c
> +++ b/opcodes/riscv-dis.c
> @@ -1610,7 +1610,7 @@ typedef enum
>
> /* Valid RISCV disassembler options. */
>
> -static struct
> +static const struct
> {
> const char *name;
> const char *description;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20250729/05cc0bc2/attachment.htm>
More information about the Binutils
mailing list