Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2012-02-08 Thread Kevin Wolf
Am 20.12.2011 10:03, schrieb Dong Xu Wang: > From: Dong Xu Wang > > On some platforms, __LINE__ will not expand to real number in > QEMU_BUILD_BUG_ON, > so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch > will > fix it. > > BTW, I got error message on RHEL 6.1/gcc 4.

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2012-01-08 Thread Dong Xu Wang
QEMU_BUILD_BUG_ON is only used in ./block/qcow2-snapshot.c, so CCed Kevin. On Tue, Dec 20, 2011 at 21:41, Stefan Hajnoczi wrote: > > On Tue, Dec 20, 2011 at 1:12 PM, Dong Xu Wang > wrote: > > It can compile on my Ubuntu: > > > > DISTRIB_ID=Ubuntu > > DISTRIB_RELEASE=11.10 > > DISTRIB_CODENAME=on

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Stefan Hajnoczi
On Tue, Dec 20, 2011 at 1:12 PM, Dong Xu Wang wrote: > It can compile on my Ubuntu: > > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=11.10 > DISTRIB_CODENAME=oneiric > DISTRIB_DESCRIPTION="Ubuntu 11.10" > > gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 > > While "gcc -E", it gets the same output as RHEL's, but

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Dong Xu Wang
It can compile on my Ubuntu: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.10 DISTRIB_CODENAME=oneiric DISTRIB_DESCRIPTION="Ubuntu 11.10" gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 While "gcc -E", it gets the same output as RHEL's, but it can compile. I do not know why was that. :( 在 2011年12月20日 下午8:08,S

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Stefan Hajnoczi
On Tue, Dec 20, 2011 at 10:47 AM, Dong Xu Wang wrote: > 于 2011年12月20日 18:13, Stefan Hajnoczi 写道: > >> On Tue, Dec 20, 2011 at 05:03:47PM +0800, Dong Xu Wang wrote: >>> >>> From: Dong Xu Wang >>> >>> On some platforms, __LINE__ will not expand to real number in >>> QEMU_BUILD_BUG_ON, >>> so if usin

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Dong Xu Wang
于 2011年12月20日 18:13, Stefan Hajnoczi 写道: On Tue, Dec 20, 2011 at 05:03:47PM +0800, Dong Xu Wang wrote: From: Dong Xu Wang On some platforms, __LINE__ will not expand to real number in QEMU_BUILD_BUG_ON, so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch will fix it.

Re: [Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Stefan Hajnoczi
On Tue, Dec 20, 2011 at 05:03:47PM +0800, Dong Xu Wang wrote: > From: Dong Xu Wang > > On some platforms, __LINE__ will not expand to real number in > QEMU_BUILD_BUG_ON, > so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch > will > fix it. > > BTW, I got error message

[Qemu-devel] [PATCH] rewrite QEMU_BUILD_BUG_ON

2011-12-20 Thread Dong Xu Wang
From: Dong Xu Wang On some platforms, __LINE__ will not expand to real number in QEMU_BUILD_BUG_ON, so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch will fix it. BTW, I got error message on RHEL 6.1/gcc 4.4.5. Signed-off-by: Dong Xu Wang --- compiler.h |4 +++-