From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTBvk-0007Ns-53 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:18:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTBvg-0000gB-Rk for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:18:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTBvg-0000fy-MJ for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:18:20 -0500 References: <1455031511-23684-1-git-send-email-peter.maydell@linaro.org> <56BA0F09.8060302@redhat.com> <56BA0F98.2040300@redhat.com> <56BA1D97.5040705@redhat.com> From: Eric Blake Message-ID: <56BA1F5B.3050903@redhat.com> Date: Tue, 9 Feb 2016 10:18:19 -0700 MIME-Version: 1.0 In-Reply-To: <56BA1D97.5040705@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3gMJ17bHDFtTfrAxM91s3TRBkBrifv4ux" Subject: Re: [Qemu-devel] [PATCH 00/14] More #include cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Patch Tracking This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3gMJ17bHDFtTfrAxM91s3TRBkBrifv4ux Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/09/2016 10:10 AM, Eric Blake wrote: > but with the new header order it expands to: >=20 > # 1989 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" 3 > namespace std > { >=20 > # 1991 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" > __attribute__ (( always_inline )) __inline__ > # 1991 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" 3 > namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } > } >=20 > So _something_ in osdep.h is redefining 'inline' with disastrous effect= s > to C++. This hack seems to fix things; but I'm not enough of a C++ expert to know if it is the best fix. diff --git i/include/qemu/compiler.h w/include/qemu/compiler.h index d22eb01..d50b806 100644 --- i/include/qemu/compiler.h +++ w/include/qemu/compiler.h @@ -77,6 +77,7 @@ #define typeof_field(type, field) typeof(((type *)0)->field) #define type_check(t1,t2) ((t1*)0 - (t2*)0) +#ifndef __cplusplus #ifndef always_inline #if !((__GNUC__ < 3) || defined(__APPLE__)) #ifdef __OPTIMIZE__ @@ -88,6 +89,7 @@ #undef inline #define inline always_inline #endif +#endif #define QEMU_BUILD_BUG_ON(x) \ typedef char glue(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused)); --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3gMJ17bHDFtTfrAxM91s3TRBkBrifv4ux Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWuh9bAAoJEKeha0olJ0NqG4oIAIRWyMF7TK+RJYIMrE4ZUHXM BYXQc0B+nEp5paDegEKKtQUeOC68fICemvJ2vH3OocmitwvRUFOT4SFnrTsInbfa ELfUkkQTuQEaFbJFxNkM3//3FtaiVNZH9TTAO5n87FpVpuKjFqQEGpKau2Kt9eD3 RlAyD+GX02Z3rg4xeWVS97EQ40JGHo4LUgIekhKcwJO6es+xvnxRl/YTCKTIhBHp 3UrLahmu1fiCxpQ9l4KP7VB1JPJiPlPEZeysPZOE9qjv1y+agC8jy7OMGXQc2yu8 Yuya+hsmlPPlYXonby7qfXBSenbHPSjh5DQ1BYDBgASKrACx60Nl/WJf2v9Wu94= =eqp+ -----END PGP SIGNATURE----- --3gMJ17bHDFtTfrAxM91s3TRBkBrifv4ux--