From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] build: Don't redefine 'inline'
Date: Fri, 12 Feb 2016 08:49:04 -0700 [thread overview]
Message-ID: <56BDFEF0.9080002@redhat.com> (raw)
In-Reply-To: <CAFEAcA8xVDyGsJaBO-pUh1CgP4gZh0Qpd62=7mxW=v2gdWyZ5g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
On 02/12/2016 06:24 AM, Peter Maydell wrote:
> On 9 February 2016 at 18:49, Eric Blake <eblake@redhat.com> wrote:
>> Actively redefining 'inline' is wrong for C++, where gcc has an
>> extension 'inline namespace' which fails to compile if the
>> keyword 'inline' is replaced by a macro expansion. This will
>> matter once we start to include "qemu/osdep.h" first from C++
>> files, depending also on whether the system headers are new
>> enough to be using the gcc extension.
>>
>> But rather than just guard things by __cplusplus, let's look at
>> the overall picture. Commit df2542c737ea2 in 2007 defined 'inline'
>> to the gcc attribute __always_inline__, with the rationale "To
>> avoid discarded inlining bug". But compilers have improved since
>> then, and we are probably better off trusting the compiler rather
>> than trying to force its hand.
>>
>> So just nuke our craziness.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> (and tested that it passes my usual merge build tests).
>
> Does this patch suffice to get your system to build all
> my clean-includes patches?
Yes.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-02-12 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 18:49 [Qemu-devel] [PATCH] build: Don't redefine 'inline' Eric Blake
2016-02-12 13:24 ` Peter Maydell
2016-02-12 15:49 ` Eric Blake [this message]
2016-02-16 13:24 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56BDFEF0.9080002@redhat.com \
--to=eblake@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).