aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-09-22 18:09:49 +0930
committerAlan Modra <amodra@gmail.com>2014-09-22 19:01:25 +0930
commit28a0da39c6db871d66b945d3025f69d56e487aa9 (patch)
treec753121ed2616c7940ca37d441c4f1e83a4c0854 /gas
parent49727e46175419c638251b39091f24c575568bee (diff)
downloadgdb-28a0da39c6db871d66b945d3025f69d56e487aa9.zip
gdb-28a0da39c6db871d66b945d3025f69d56e487aa9.tar.gz
gdb-28a0da39c6db871d66b945d3025f69d56e487aa9.tar.bz2
Fix various warnings seen when using gcc-5.0
* config/tc-m68k.c (md_assemble): Add assert to work around bogus trunk gcc warning. * config/tc-pj.h (md_convert_frag): Warning fix. * config/tc-xtensa.c (xg_assemble_vliw_tokens): Warning fix.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-m68k.c3
-rw-r--r--gas/config/tc-pj.h2
-rw-r--r--gas/config/tc-xtensa.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a01b41e..9d512b6 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2014-09-22 Alan Modra <amodra@gmail.com>
+
+ * config/tc-m68k.c (md_assemble): Add assert to work around
+ bogus trunk gcc warning.
+ * config/tc-pj.h (md_convert_frag): Warning fix.
+ * config/tc-xtensa.c (xg_assemble_vliw_tokens): Warning fix.
+
2014-09-17 Tristan Gingold <gingold@adacore.com>
* config/tc-arm.c (move_or_literal_pool, add_to_lit_pool): Use
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 56db083..7fc4efe 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4511,7 +4511,8 @@ md_assemble (char *str)
(relax_substateT) (the_ins.fragb[n].fragty),
the_ins.fragb[n].fadd, the_ins.fragb[n].foff, to_beg_P);
}
- n = (the_ins.numo - the_ins.fragb[n - 1].fragoff);
+ gas_assert (the_ins.nfrag >= 1);
+ n = the_ins.numo - the_ins.fragb[the_ins.nfrag - 1].fragoff;
shorts_this_frag = 0;
if (n)
{
diff --git a/gas/config/tc-pj.h b/gas/config/tc-pj.h
index eda1792..61cd11f 100644
--- a/gas/config/tc-pj.h
+++ b/gas/config/tc-pj.h
@@ -36,7 +36,7 @@ void pj_cons_fix_new_pj (struct frag *, int, int, expressionS *,
arelent *tc_gen_reloc (asection *, struct fix *);
#define md_section_align(SEGMENT, SIZE) (SIZE)
-#define md_convert_frag(B, S, F) (as_fatal (_("convert_frag\n")), 0)
+#define md_convert_frag(B, S, F) as_fatal (_("convert_frag\n"))
#define md_estimate_size_before_relax(A, B) (as_fatal (_("estimate size\n")),0)
#define md_undefined_symbol(NAME) 0
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 7547c0a0..d11b0c7 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -6963,7 +6963,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn)
if (frag_now_fix () != 0
&& (! frag_now->tc_frag_data.is_insn
|| (vinsn_has_specific_opcodes (vinsn) && use_transform ())
- || !use_transform () != frag_now->tc_frag_data.is_no_transform
+ || (!use_transform ()) != frag_now->tc_frag_data.is_no_transform
|| (directive_state[directive_longcalls]
!= frag_now->tc_frag_data.use_longcalls)
|| (directive_state[directive_absolute_literals]