]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: Use correct data type in parse_operands
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 19 Jul 2021 17:04:01 +0000 (18:04 +0100)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:59:24 +0000 (15:59 -0700)
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.

gas/ChangeLog
gas/config/tc-aarch64.c

index 7f45df6e85d5bc877a1b5f303d53d14391fc45cf..ccc42f9eaa949a0a70f354ee743dec33b474ce68 100644 (file)
@@ -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
index 2270b40727dfca007edf4d6349105cd978ca2092..b7937b4cf615147f243fc56cf4ac7377bf49aa36 100644 (file)
@@ -7349,7 +7349,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);