This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [buildbot] gas/config/tc-mips.c r1.579: error: signed and unsigned type in conditional expression


Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> The recent R5900 / VU0 gave us a new error:
>
> [...]
> gcc -DHAVE_CONFIG_H -I. -I../../../../binutils/gas  -I. -I../../../../binutils/gas -I../bfd -I../../../../binutils/gas/config -I../../../../binutils/gas/../include -I../../../../binutils/gas/.. -I../../../../binutils/gas/../bfd -DLOCALEDIR="\"/home/vaxbuild/_install_/mips64el-linux/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-mips.o -MD -MP -MF .deps/tc-mips.Tpo -c -o tc-mips.o `test -f 'config/tc-mips.c' || echo '../../../../binutils/gas/'`config/tc-mips.c
> ../../../../binutils/gas/config/tc-mips.c: In function âmips_lookup_insnâ:
> ../../../../binutils/gas/config/tc-mips.c:12351:40: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
>        opend = dot != NULL ? dot - name : length;
>                                         ^
> cc1: all warnings being treated as errors

Fixed as follows.

Richard

gas/
	* config/tc-mips.c (mips_lookup_insn): Make length and opend signed.

Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c	2013-08-05 09:27:21.164069975 +0100
+++ gas/config/tc-mips.c	2013-08-05 09:29:31.264367476 +0100
@@ -12307,11 +12307,11 @@ mips16_macro (struct mips_cl_insn *ip)
 
 static struct mips_opcode *
 mips_lookup_insn (struct hash_control *hash, const char *start,
-		  unsigned int length, unsigned int *opcode_extra)
+		  ssize_t length, unsigned int *opcode_extra)
 {
   char *name, *dot, *p;
   unsigned int mask, suffix;
-  size_t opend;
+  ssize_t opend;
   struct mips_opcode *insn;
 
   /* Make a copy of the instruction so that we can fiddle with it.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]