This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed] Rewrite main mips16_ip parsing loop
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 15 Jul 2013 19:39:48 +0100
- Subject: Re: [committed] Rewrite main mips16_ip parsing loop
- References: <87hafxz1tm dot fsf at talisman dot default> <1373903350 dot 26096 dot 56 dot camel at ubuntu-sellcey>
Steve Ellcey <sellcey@mips.com> writes:
> I am not sure which patch caused it, but I am getting a build error on
> MIPS gas right now.
>
> /local/home/sellcey/nightly/src/binutils/gas/config/tc-mips.c: In
> function 'match_save_restore_list_operand':
> /local/home/sellcey/nightly/src/binutils/gas/config/tc-mips.c:4733:
> error: format not a string literal and no format arguments
I assume that's a -Wformat -Werror thing?
> /local/home/sellcey/nightly/src/binutils/gas/config/tc-mips.c: In
> function 'mips16_macro_build':
> /local/home/sellcey/nightly/src/binutils/gas/config/tc-mips.c:7017:
> error: first argument to 'va_arg' not of type 'va_list'
Oops.
> Do you see this problem on your side?
No, but I think the first one depends on GCC version and the second one
depends on ABI. Hopefully this should fix it. Tested on mips64-linux-gnu
and applied.
Thanks,
Richard
gas/
* config/tc-mips.c (match_save_restore_list_operand): Avoid -Wformat
error with older GCCs.
(mips16_macro_build): Dereference args.
Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c 2013-07-15 19:05:45.233723992 +0100
+++ gas/config/tc-mips.c 2013-07-15 19:31:15.575825963 +0100
@@ -4730,7 +4730,7 @@ match_save_restore_list_operand (struct
{
if (arg->soft_match)
return FALSE;
- as_bad (error);
+ as_bad ("%s", error);
}
/* Finally build the instruction. */
@@ -7014,7 +7014,7 @@ mips16_macro_build (expressionS *ep, con
if (!operand)
abort ();
- insn_insert_operand (&insn, operand, va_arg (args, int));
+ insn_insert_operand (&insn, operand, va_arg (*args, int));
break;
}
}