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]

[BUILDROBOT][PATCH] moxie: right-hand operand of comma expression has no effect


Hi!

Building Binutils for moxie-elf with a somewhat recent GCC gives me
(cf.
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=346240):

 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/moxie-elf/_install_/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT write.o -MD -MP -MF .deps/write.Tpo -c -o write.o /home/vaxbuild/repos/binutils_gdb/gas/write.c
In file included from ./targ-cpu.h:1:0,
                 from /home/vaxbuild/repos/binutils_gdb/gas/config/obj-elf.h:39,
                 from ./obj-format.h:1,
                 from /home/vaxbuild/repos/binutils_gdb/gas/config/te-generic.h:36,
                 from ./targ-env.h:1,
                 from /home/vaxbuild/repos/binutils_gdb/gas/as.h:540,
                 from /home/vaxbuild/repos/binutils_gdb/gas/write.c:23:
/home/vaxbuild/repos/binutils_gdb/gas/write.c: In function âcvt_frag_to_fillâ:
/home/vaxbuild/repos/binutils_gdb/gas/config/tc-moxie.h:37:76: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 #define md_convert_frag(B, S, F)            (as_fatal (_("convert_frag\n")), 0)
                                                                            ^
/home/vaxbuild/repos/binutils_gdb/gas/write.c:487:7: note: in expansion of macro âmd_convert_fragâ
       md_convert_frag (stdoutput, sec, fragP);
       ^
cc1: all warnings being treated as errors
Makefile:896: recipe for target 'write.o' failed
make[3]: *** [write.o] Error 1


This should cure it:


2014-08-24  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

gas/
	* config/tc-moxie.h (md_convert_frag): Silence warning.

 
diff --git a/gas/config/tc-moxie.h b/gas/config/tc-moxie.h
index ed4f273..0a88813 100644
--- a/gas/config/tc-moxie.h
+++ b/gas/config/tc-moxie.h
@@ -34,7 +34,7 @@
 /* These macros must be defined, but is will be a fatal assembler
    error if we ever hit them.  */
 #define md_estimate_size_before_relax(A, B) (as_fatal (_("estimate size\n")), 0)
-#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"))
 
 /* If you define this macro, it should return the offset between the
    address of a PC relative fixup and the position from which the PC



Ok?

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: signature.asc
Description: Digital signature


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