aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-25 19:13:27 +0000
committerNick Clifton <nickc@redhat.com>2009-09-25 19:13:27 +0000
commit21d799b5c48956e71980143cb33035262984ed67 (patch)
treedbc66291451a9c7a4eb814c731c2bb247bba23b5 /gas/config/tc-arc.c
parentfa9efd0fbc3f388e06f8f893c168e8e612216230 (diff)
downloadgdb-21d799b5c48956e71980143cb33035262984ed67.zip
gdb-21d799b5c48956e71980143cb33035262984ed67.tar.gz
gdb-21d799b5c48956e71980143cb33035262984ed67.tar.bz2
Update soruces to make alpha, arc and arm targets compile cleanly
with -Wc++-compat: * config/tc-alpha.c: Add casts. (extended_bfd_reloc_code_real_type): New type. Used to avoid enumeration conversion warnings. (struct alpha_fixup, void assemble_insn, assemble_insn) (assemble_tokens): Use new type. * ecoff.c: Add casts. (mark_stabs): Use enumeration names. * config/obj-elf.c: Add cast * config/tc-arc.c: Add casts. * config/obj-aout.h (text_section,data_section,bss_section): Make extern. * config/obj-elf.c: Add cast. * config/tc-arm.c: Add casts. (X, TxCE, TxCE, TxC3, TxC3w, TxCM_, TxCM, TUE, TUF, CE, CL, cCE) (cCL, C3E, xCM_, nUF, nCE_tag): Change input format to avoid the need for keywords as arguments. * ecoff.c: Add casts. * ecofflink.c: Add casts. * elf64-alpha.c: Add casts. (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move to top level. (SKIP_HOWTO): Use enum name. * elf32-arm.c: Add casts. (elf32_arm_vxworks_bed): Update code to avoid multiple declarations. (struct map_stub): Move to top level. * arc-dis.c Fix casts. * arc-ext.c: Add casts. * arm-dis.c (enum opcode_sentinel_enum): Gave name to anonymous enum. * emultempl/armelf.em: Add casts.
Diffstat (limited to 'gas/config/tc-arc.c')
-rw-r--r--gas/config/tc-arc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 1348f5d..b5d073e 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -540,7 +540,8 @@ arc_extoper (int opertype)
return;
}
- ext_oper = xmalloc (sizeof (struct arc_ext_operand_value));
+ ext_oper = (struct arc_ext_operand_value *)
+ xmalloc (sizeof (struct arc_ext_operand_value));
if (opertype)
{
@@ -802,7 +803,7 @@ arc_extinst (int ignore ATTRIBUTE_UNUSED)
strcat (syntax, "%F");
strcat (syntax, "%S%L");
- ext_op = xmalloc (sizeof (struct arc_opcode));
+ ext_op = (struct arc_opcode *) xmalloc (sizeof (struct arc_opcode));
ext_op->syntax = xstrdup (syntax);
ext_op->mask = I (-1) | ((0x3 == opcode) ? C (-1) : 0);
@@ -1196,7 +1197,8 @@ arc_cons_fix_new (fragS *frag,
/* This may be a special ARC reloc (eg: %st()). */
reloc_type = get_arc_exp_reloc_type (1, BFD_RELOC_32, exp, &exptmp);
- fix_new_exp (frag, where, nbytes, &exptmp, 0, reloc_type);
+ fix_new_exp (frag, where, nbytes, &exptmp, 0,
+ (enum bfd_reloc_code_real) reloc_type);
}
else
{
@@ -1350,8 +1352,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
{
arelent *reloc;
- reloc = xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
@@ -1568,7 +1570,8 @@ md_assemble (char *str)
if ((suf = get_ext_suffix (s)))
ext_suffix_p = 1;
else
- suf = hash_find (arc_suffix_hash, s);
+ suf = (const struct arc_operand_value *)
+ hash_find (arc_suffix_hash, s);
if (!suf)
{
/* This can happen in "blle foo" and we're currently using