-----Original Message----- From: Matthew Malcomson Matthew.Malcomson@arm.com Sent: 20 July 2021 11:50 To: gnu-morello@op-lists.linaro.org Cc: Kyrylo Tkachov Kyrylo.Tkachov@arm.com Subject: gas: Use correct data type in parse_operands
We're choosing the bfd_reloc_code_real_type value to set on inst.reloc.type. Hence we should use the bfd_reloc_code_real_type type for our temporaries.
This was not failing since the temporaries could hold the relevant types, but was causing warnings that broke the build if running with -Werror. I saw the warning on gcc version 10 and 11, I did not see the warning on gcc version 7.5.
Testsuite as a cross-build for aarch64-none-elf and aarch64-linux native shows no change.
OK for users/ARM/morello-binutils-gdb-master?
Ok, but isn't this needed in the Binutils master?
Thanks, Kyrill
############### Attachment also inlined for ease of reply ############### Inline version does not contain generated files
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 648b182666aa558240fa02685247241be3852f23..72460349c8d986ba2bfecfb 78aec2ca42368cbc5 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -6638,7 +6638,7 @@ bad_adrdp: case branch_imm: /* e.g. B or BL */ {
enum aarch64_opnd jump, call;
bfd_reloc_code_real_type jump, call; gas_assert (operands[i] ==
AARCH64_OPND_ADDR_PCREL26);
On 20/07/2021 12:02, Kyrylo Tkachov wrote:
-----Original Message----- From: Matthew Malcomson Matthew.Malcomson@arm.com Sent: 20 July 2021 11:50 To: gnu-morello@op-lists.linaro.org Cc: Kyrylo Tkachov Kyrylo.Tkachov@arm.com Subject: gas: Use correct data type in parse_operands
We're choosing the bfd_reloc_code_real_type value to set on inst.reloc.type. Hence we should use the bfd_reloc_code_real_type type for our temporaries.
This was not failing since the temporaries could hold the relevant types, but was causing warnings that broke the build if running with -Werror. I saw the warning on gcc version 10 and 11, I did not see the warning on gcc version 7.5.
Testsuite as a cross-build for aarch64-none-elf and aarch64-linux native shows no change.
OK for users/ARM/morello-binutils-gdb-master?
Ok, but isn't this needed in the Binutils master?
Thanks, Kyrill
Thanks, The temporaries were added in the morello branch, and are not in binutils master.
(N.b. Kyrill you're going to receive two emails as I cancelled the first going to the list so I could subscribe to the list to avoid waiting on moderator approval).
############### Attachment also inlined for ease of reply ############### Inline version does not contain generated files
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 648b182666aa558240fa02685247241be3852f23..72460349c8d986ba2bfecfb 78aec2ca42368cbc5 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -6638,7 +6638,7 @@ bad_adrdp: case branch_imm: /* e.g. B or BL */ {
enum aarch64_opnd jump, call;
bfd_reloc_code_real_type jump, call; gas_assert (operands[i] ==
AARCH64_OPND_ADDR_PCREL26);
gnu-morello@op-lists.linaro.org