Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil writes: > That's strange. > > The lines which cause compiler errors look like this: > > vfio_eoi(DO_UPCAST(VFIODevice, bars[bar->nr], bar)); > > There are more uses of DO_UPCAST without any compiler error: > > VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev); > > Neither o

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Richard Henderson writes: >> diff --git a/osdep.h b/osdep.h >> index cb213e0..df89552 100644 >> --- a/osdep.h >> +++ b/osdep.h >> @@ -41,8 +41,9 @@ typedef signed int int_fast16_t; >> #endif >> >> /* Convert from a base type to a parent type, with compile time checking. >> */ >

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Richard Henderson
On 10/03/2012 11:04 AM, Søren Sandmann wrote: > From: Søren Sandmann Pedersen > > Apparently GCC 4.5 still warns about "value computed not used" even > with __attribute__((unused)). Fix this by only doing the compile time > check on gcc > 4.5. > > Signed-off-by: Soren Sandmann > --- > > I need

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Stefan Weil
Am 03.10.2012 21:49, schrieb Søren Sandmann: Stefan Weil writes: I don't see any warnings with gcc Debian 4.4.5-8. Could you please provide more information on your environment and the warnings which you get? Here is a macro which simplifies the version check: #if QEMU_GNUC_PREREQ(4, 6) Re

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil writes: > I don't see any warnings with gcc Debian 4.4.5-8. > > Could you please provide more information on your environment > and the warnings which you get? > > Here is a macro which simplifies the version check: > > #if QEMU_GNUC_PREREQ(4, 6) > > Regards > > Stefan Weil With this

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Stefan Weil
Am 03.10.2012 20:04, schrieb Søren Sandmann: From: Søren Sandmann Pedersen Apparently GCC 4.5 still warns about "value computed not used" even with __attribute__((unused)). Fix this by only doing the compile time check on gcc> 4.5. Signed-off-by: Soren Sandmann --- I need this patch to get qe

[Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen Apparently GCC 4.5 still warns about "value computed not used" even with __attribute__((unused)). Fix this by only doing the compile time check on gcc > 4.5. Signed-off-by: Soren Sandmann --- I need this patch to get qemu to compile with GCC 4.5, but I'm not sure