qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] error compiling hw/sh7750.c
@ 2007-11-11 14:30 Ben Taylor
  2007-11-11 16:06 ` Carlo Marcelo Arenas Belon
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Taylor @ 2007-11-11 14:30 UTC (permalink / raw)
  To: qemu-devel


I'm getting this error compiling hw/sh7750.c

I believe the problem comes from the include in hw/sh_intc.h
with the macro

#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)

in line 587 of hw/7750.c, I see

        sh_intc_register_sources(&s->intc,
                                 _INTC_ARRAY(vectors_irlm),
                                 _INTC_ARRAY(NULL));

So the macro turns the last _INTC_ARRAY(NULL) into

"NULL, sizeof(NULL)/sizeof(*NULL)

Since sizeof(*NULL) doesn't make any sense, the compiler barfs
on Solaris 10/x86_64.

gcc -Wall -O2 -g -fno-strict-aliasing -m64 -I. -I.. -I/export-1/bent/src/qemu/111107/qemu/target-sh4 -I/export-1/bent/src/qemu/111107/qemu -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/export-1/bent/src/qemu/111107/qemu/fpu -I/usr/gnu/include   -I/export-1/bent/src/qemu/111107/qemu/slirp  -m64  -c -o sh7750.o /export-1/bent/src/qemu/111107/qemu/hw/sh7750.c
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `error_access':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:184: warning: unsigned int format, different type arg (arg 5)
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `ignore_access':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:190: warning: unsigned int format, different type arg (arg 5)
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `sh7750_init':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:576: error: invalid type argument of `unary *'
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:589: error: invalid type argument of `unary *'
gmake[1]: *** [sh7750.o] Error 1
gmake[1]: Leaving directory `/export-1/bent/src/qemu/111107/qemu/sh4-softmmu'
gmake: *** [subdir-sh4-softmmu] Error 2

In this case, I've replaced _INTC_ARRAY(NULL) with "NULL, NULL" and it
succesfully compiles, but I don't have any sh emulation to do.

Ben

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

end of thread, other threads:[~2007-11-11 17:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-11 14:30 [Qemu-devel] error compiling hw/sh7750.c Ben Taylor
2007-11-11 16:06 ` Carlo Marcelo Arenas Belon
2007-11-11 17:21   ` Carlo Marcelo Arenas Belon
2007-11-11 17:24     ` Paul Brook
2007-11-11 18:03       ` Carlo Marcelo Arenas Belon
2007-11-11 17:46     ` M. Warner Losh
2007-11-11 17:49     ` Andreas Schwab

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 NNTP newsgroup(s).