aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2019-10-26 16:48:59 -0400
committerJohn David Anglin <danglin@gcc.gnu.org>2019-10-26 16:48:59 -0400
commitf612a98f9fbcf7058bde36a3c19654c2a71a541c (patch)
treeca2a5cfed596b70139a96de4b3b331492b65e377 /gas
parentOptimise away eh_frame advance_loc 0 (diff)
downloadbinutils-gdb-f612a98f9fbcf7058bde36a3c19654c2a71a541c.tar.gz
binutils-gdb-f612a98f9fbcf7058bde36a3c19654c2a71a541c.tar.bz2
binutils-gdb-f612a98f9fbcf7058bde36a3c19654c2a71a541c.zip
Add some missing casts to suppress implicit cast warnings
PR gas/25121 * config/tc-hppa.c (tc_gen_reloc): Cast some enums to int. (md_assemble): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-hppa.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f900c26af45..53c90eae888 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-26 John David Anglin <danglin@gcc.gnu.org>
+
+ PR gas/25121
+ * config/tc-hppa.c (tc_gen_reloc): Cast some enums to int.
+ (md_assemble): Likewise.
+
2019-10-26 Alan Modra <amodra@gmail.com>
PR 25125
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index fb6d82bc596..12279f2c6f5 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1365,15 +1365,15 @@ tc_gen_reloc (asection *section, fixS *fixp)
/* ??? It might be better to hide this +8 stuff in tc_cfi_emit_pcrel_expr,
undefine DIFF_EXPR_OK, and let these sorts of complex expressions fail
when R_HPPA_COMPLEX == R_PARISC_UNIMPLEMENTED. */
- if (fixp->fx_r_type == (bfd_reloc_code_real_type) R_HPPA_COMPLEX
+ if (fixp->fx_r_type == (int) R_HPPA_COMPLEX
&& fixp->fx_pcrel)
{
- fixp->fx_r_type = R_HPPA_PCREL_CALL;
+ fixp->fx_r_type = (int) R_HPPA_PCREL_CALL;
fixp->fx_offset += 8;
}
codes = hppa_gen_reloc_type (stdoutput,
- fixp->fx_r_type,
+ (int) fixp->fx_r_type,
hppa_fixp->fx_r_format,
hppa_fixp->fx_r_field,
fixp->fx_subsy != NULL,
@@ -5787,7 +5787,7 @@ md_assemble (char *str)
if (the_insn.reloc != R_HPPA_NONE)
fix_new_hppa (frag_now, (to - frag_now->fr_literal), 4, NULL,
(offsetT) 0, &the_insn.exp, the_insn.pcrel,
- the_insn.reloc, the_insn.field_selector,
+ (int) the_insn.reloc, the_insn.field_selector,
the_insn.format, the_insn.arg_reloc, 0);
#ifdef OBJ_ELF
@@ -8317,7 +8317,8 @@ hppa_fix_adjustable (fixS *fixp)
/* LR/RR selectors are implicitly used for a number of different relocation
types. We must ensure that none of these types are adjusted (see below)
even if they occur with a different selector. */
- code = elf_hppa_reloc_final_type (stdoutput, fixp->fx_r_type,
+ code = elf_hppa_reloc_final_type (stdoutput,
+ (int) fixp->fx_r_type,
hppa_fix->fx_r_format,
hppa_fix->fx_r_field);