summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2021-07-19 18:04:01 +0100
committerMatthew Malcomson <matthew.malcomson@arm.com>2021-07-20 12:37:07 +0100
commit8f2cd6521f047358e4b72bcafa77e47f1d15d52a (patch)
treed6a584e380918a6fb060124efa44dca7778d2edc
parent4a282ed903fcce7e98d09af474eca5e2b7c209f4 (diff)
downloadbinutils-gdb-8f2cd6521f047358e4b72bcafa77e47f1d15d52a.tar.gz
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. --- 2021-07-20 Matthew Malcomson <matthew.malcomson@arm.com> gas/ChangeLog: * config/tc-aarch64.h (parse_operands): Use correct enum type for temporaries.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-aarch64.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7a09f844952..4e8a994c2c4 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-20 Matthew Malcomson <matthew.malcomson@arm.com>
+
+ * config/tc-aarch64.c (parse_operands): Use correct enum type for
+ temporaries.
+
2021-07-13 Alex Coplan <alex.coplan@arm.com>
* config/tc-aarch64.h (TC_INIT_FIX_DATA): Initialize c64
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 648b182666a..72460349c8d 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);