From 127a8db1ed4fc7903007dc23c6b11f613933f9ef Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 4 Nov 2014 14:41:00 +1030 Subject: Use frag_now_fix_octets in gas d10v, d30v obstack_next_free is supposed to return a void* rather than the char* it does currently, so expressions involving pointer arithmetic need a cast. Avoid the issue. * config/tc-d10v.c (find_opcode): Call frag_now_fix_octets rather than equivalent obstack_next_free expression. * config/tc-d30v.c (find_format): Likewise. --- gas/config/tc-d30v.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gas/config/tc-d30v.c') diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index 9076e4125c4..a73f9b1f9e6 100644 --- a/gas/config/tc-d30v.c +++ b/gas/config/tc-d30v.c @@ -1242,12 +1242,10 @@ find_format (struct d30v_opcode *opcode, /* Calculate the current address by running through the previous frags and adding our current offset. */ - value = 0; + value = frag_now_fix_octets (); for (f = frchain_now->frch_root; f; f = f->fr_next) value += f->fr_fix + f->fr_offset; - value = (S_GET_VALUE (myops[j].X_add_symbol) - value - - (obstack_next_free (&frchain_now->frch_obstack) - - frag_now->fr_literal)); + value = S_GET_VALUE (myops[j].X_add_symbol) - value; if (check_range (value, bits, flags)) match = 0; } -- cgit v1.2.1