From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Blake <eblake@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] build: Don't redefine 'inline'
Date: Tue, 16 Feb 2016 13:24:51 +0000 [thread overview]
Message-ID: <CAFEAcA-hixvQAPc8vL3xPEC9ZLNxfSaGJ-Td1UT3fyA=eAzUDg@mail.gmail.com> (raw)
In-Reply-To: <1455043788-28112-1-git-send-email-eblake@redhat.com>
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>
> ---
> include/qemu/compiler.h | 12 ------------
> 1 file changed, 12 deletions(-)
Applied to master, thanks. I am all in favour of reducing
the craziness quotient of our codebase.
-- PMM
prev parent reply other threads:[~2016-02-16 13:25 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
2016-02-16 13:24 ` Peter Maydell [this message]
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='CAFEAcA-hixvQAPc8vL3xPEC9ZLNxfSaGJ-Td1UT3fyA=eAzUDg@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=eblake@redhat.com \
--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).