From 62194b631d00112bac1f8856d3259d774df4c15e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 2 Jul 2021 17:27:31 +0930 Subject: Re: Fix minor NDS32 renaming snafu Some extern declarations differ in constnes to their definitions too. Let's make sure this sort of thing doesn't happen again, but putting the externs in a header where they belong. gas/ * config/tc-nds32.c (nds32_keyword_gpr): Don't declare. (md_begin): Constify k. opcodes/ * nds32-dis.c (nds32_find_reg_keyword): Constify arg and return. (nds32_parse_audio_ext, nds32_parse_opcode): Constify psys_reg. (nds32_field_table, nds32_opcode_table, nds32_keyword_table), (nds32_opcodes, nds32_operand_fields, nds32_keywords), (nds32_keyword_gpr): Move declarations to.. * nds32-asm.h: ..here, constifying to match definitions. --- gas/config/tc-nds32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c index 04ae689..4ff667c 100644 --- a/gas/config/tc-nds32.c +++ b/gas/config/tc-nds32.c @@ -97,7 +97,6 @@ static int optimize_for_space = 0; static int label_exist = 0; /* Flag to save state in omit_fp region. */ static int in_omit_fp = 0; -extern struct nds32_keyword nds32_keyword_gpr[]; /* Tag there is relax relocation having to link. */ static bool relaxing = false; /* ICT model. */ @@ -4601,7 +4600,7 @@ nds32_asm_parse_operand (struct nds32_asm_desc *pdesc ATTRIBUTE_UNUSED, void md_begin (void) { - struct nds32_keyword *k; + const struct nds32_keyword *k; relax_info_t *relax_info; int flags = 0; -- cgit v1.1