public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [buildrobot] ppc: signed/unsigned comparison
@ 2013-11-08  8:59 Jan-Benedict Glaw
  2013-11-11  0:01 ` [ping] [buildrobot] [PATCH] " Jan-Benedict Glaw
  2013-11-11  7:06 ` [buildrobot] " Alan Modra
  0 siblings, 2 replies; 3+ messages in thread
From: Jan-Benedict Glaw @ 2013-11-08  8:59 UTC (permalink / raw)
  To: Ulrich Weigand, Alan Modra; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

Hi!

With GCC 4.8.1 on my i686 builder targeting ppc-linux, I got:


gcc -DHAVE_CONFIG_H -I. -I/home/vaxbuild/repos/binutils_gdb/gas  -I. -I/home/vaxbuild/repos/binutils_gdb/gas -I../bfd -I/home/vaxbuild/repos/binutils_gdb/gas/config -I/home/vaxbuild/repos/binutils_gdb/gas/../include -I/home/vaxbuild/repos/binutils_gdb/gas/.. -I/home/vaxbuild/repos/binutils_gdb/gas/../bfd -DLOCALEDIR="\"/home/vaxbuild/build/ppc-linux/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-ppc.o -MD -MP -MF .deps/tc-ppc.Tpo -c -o tc-ppc.o `test -f 'config/tc-ppc.c' || echo '/home/vaxbuild/repos/binutils_gdb/gas/'`config/tc-ppc.c
/home/vaxbuild/repos/binutils_gdb/gas/config/tc-ppc.c: In function ‘ppc_elf_localentry’:
/home/vaxbuild/repos/binutils_gdb/gas/config/tc-ppc.c:2272:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       if (exp.X_add_number != PPC64_LOCAL_ENTRY_OFFSET (encoded))
                            ^
cc1: all warnings being treated as errors
make[3]: *** [tc-ppc.o] Error 1

(See http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=24877)

This should probably fix it:


2013-11-08  Jan-Benedict Glaw  <jbglaw@lug-owl.de

	* config/tc-ppc.c (ppc_elf_localentry): Add cast.

 
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 822f5a2..7c99e43 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -2269,7 +2269,7 @@ ppc_elf_localentry (int ignore ATTRIBUTE_UNUSED)
     {
       unsigned char encoded = PPC64_SET_LOCAL_ENTRY_OFFSET (exp.X_add_number);
 
-      if (exp.X_add_number != PPC64_LOCAL_ENTRY_OFFSET (encoded))
+      if (exp.X_add_number != (offsetT) PPC64_LOCAL_ENTRY_OFFSET (encoded))
         as_bad (_(".localentry expression for `%s' "
 		  "is not a valid power of 2"), S_GET_NAME (sym));
       else


MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:                     Eine Freie Meinung in einem Freien Kopf
the second  :                   für einen Freien Staat voll Freier Bürger.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ping] [buildrobot] [PATCH] ppc: signed/unsigned comparison
  2013-11-08  8:59 [buildrobot] ppc: signed/unsigned comparison Jan-Benedict Glaw
@ 2013-11-11  0:01 ` Jan-Benedict Glaw
  2013-11-11  7:06 ` [buildrobot] " Alan Modra
  1 sibling, 0 replies; 3+ messages in thread
From: Jan-Benedict Glaw @ 2013-11-11  0:01 UTC (permalink / raw)
  To: Ulrich Weigand, Alan Modra; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

Hi!

On Fri, 2013-11-08 09:59:44 +0100, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> With GCC 4.8.1 on my i686 builder targeting ppc-linux, I got:
> 
> gcc -DHAVE_CONFIG_H -I. -I/home/vaxbuild/repos/binutils_gdb/gas  -I. -I/home/vaxbuild/repos/binutils_gdb/gas -I../bfd -I/home/vaxbuild/repos/binutils_gdb/gas/config -I/home/vaxbuild/repos/binutils_gdb/gas/../include -I/home/vaxbuild/repos/binutils_gdb/gas/.. -I/home/vaxbuild/repos/binutils_gdb/gas/../bfd -DLOCALEDIR="\"/home/vaxbuild/build/ppc-linux/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT tc-ppc.o -MD -MP -MF .deps/tc-ppc.Tpo -c -o tc-ppc.o `test -f 'config/tc-ppc.c' || echo '/home/vaxbuild/repos/binutils_gdb/gas/'`config/tc-ppc.c
> /home/vaxbuild/repos/binutils_gdb/gas/config/tc-ppc.c: In function ‘ppc_elf_localentry’:
> /home/vaxbuild/repos/binutils_gdb/gas/config/tc-ppc.c:2272:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>        if (exp.X_add_number != PPC64_LOCAL_ENTRY_OFFSET (encoded))
>                             ^
> cc1: all warnings being treated as errors
> make[3]: *** [tc-ppc.o] Error 1
> 
> (See http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=24877)

I'd like to ping this patch:
https://sourceware.org/ml/binutils/2013-11/msg00064.html

Thanks, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:               The real problem with C++ for kernel modules is:
the second  :                                 the language just sucks.
                                                   -- Linus Torvalds

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [buildrobot] ppc: signed/unsigned comparison
  2013-11-08  8:59 [buildrobot] ppc: signed/unsigned comparison Jan-Benedict Glaw
  2013-11-11  0:01 ` [ping] [buildrobot] [PATCH] " Jan-Benedict Glaw
@ 2013-11-11  7:06 ` Alan Modra
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Modra @ 2013-11-11  7:06 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: Ulrich Weigand, binutils

On Fri, Nov 08, 2013 at 09:59:44AM +0100, Jan-Benedict Glaw wrote:
> 	* config/tc-ppc.c (ppc_elf_localentry): Add cast.

OK, thanks!

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-11  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-08  8:59 [buildrobot] ppc: signed/unsigned comparison Jan-Benedict Glaw
2013-11-11  0:01 ` [ping] [buildrobot] [PATCH] " Jan-Benedict Glaw
2013-11-11  7:06 ` [buildrobot] " Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).