All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 05/28] build: Don't redefine 'inline'
Date: Tue, 16 Feb 2016 17:34:23 +0100	[thread overview]
Message-ID: <1455640486-6101-6-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1455640486-6101-1-git-send-email-pbonzini@redhat.com>

From: Eric Blake <eblake@redhat.com>

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>
Message-Id: <1455043788-28112-1-git-send-email-eblake@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/qemu/compiler.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index d22eb01..c5fbe28 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -77,18 +77,6 @@
 #define typeof_field(type, field) typeof(((type *)0)->field)
 #define type_check(t1,t2) ((t1*)0 - (t2*)0)
 
-#ifndef always_inline
-#if !((__GNUC__ < 3) || defined(__APPLE__))
-#ifdef __OPTIMIZE__
-#undef inline
-#define inline __attribute__ (( always_inline )) __inline__
-#endif
-#endif
-#else
-#undef inline
-#define inline always_inline
-#endif
-
 #define QEMU_BUILD_BUG_ON(x) \
     typedef char glue(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused));
 
-- 
2.5.0

  parent reply	other threads:[~2016-02-16 16:34 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 16:34 [Qemu-devel] [PULL 00/28] Bug fixes + NBD-over-TLS support patches for 2016-02-16 Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 01/28] checkpatch: Eliminate false positive in case of comma-space-square bracket Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 02/28] checkpatch: Eliminate false positive in case of space before square bracket in a definition Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 03/28] Revert "qemu-char: Keep pty slave file descriptor open until the master is closed" Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 04/28] char: fix handling of QIO_CHANNEL_ERR_BLOCK Paolo Bonzini
2016-02-16 16:34 ` Paolo Bonzini [this message]
2016-02-16 16:34 ` [Qemu-devel] [PULL 06/28] vl: change QEMU state machine for system reset Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 07/28] vl: fix migration from prelaunch state Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 08/28] migration: fix incorrect memory_global_dirty_log_start outside BQL Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 09/28] mptsas: add missing va_end Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 10/28] mptsas: fix memory leak Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 11/28] mptsas: fix wrong formula Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 12/28] ipmi: sensor number should not exceed MAX_SENSORS Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 13/28] qom: add helpers for UserCreatable object types Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 14/28] qemu-nbd: add support for --object command line arg Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 15/28] nbd: convert block client to use I/O channels for connection setup Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 16/28] nbd: convert qemu-nbd server " Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 17/28] nbd: convert blockdev NBD " Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 18/28] nbd: convert to using I/O channels for actual socket I/O Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 19/28] nbd: invert client logic for negotiating protocol version Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 20/28] nbd: make server compliant with fixed newstyle spec Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 21/28] nbd: make client request fixed new style if advertised Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 22/28] nbd: allow setting of an export name for qemu-nbd server Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 23/28] nbd: always query export list in fixed new style protocol Paolo Bonzini
2016-05-17  9:53   ` Richard W.M. Jones
2016-05-17 15:09     ` Eric Blake
2016-05-17 15:22       ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-17 15:52         ` Eric Blake
2016-05-17 15:58           ` Richard W.M. Jones
2016-05-17 16:05             ` Eric Blake
2016-05-17 16:41               ` Richard W.M. Jones
2016-05-17 16:56                 ` Eric Blake
2016-05-17 17:36                   ` Alex Bligh
2016-05-17 18:47                     ` Richard W.M. Jones
2016-05-17 15:59           ` Eric Blake
2016-05-17 16:39             ` Richard W.M. Jones
2016-05-17 16:58               ` Eric Blake
2016-05-17 16:22           ` Alex Bligh
2016-05-17 16:50             ` Eric Blake
2016-05-17 17:34               ` Alex Bligh
2016-05-21 21:53               ` Wouter Verhelst
2016-05-22 18:16                 ` Richard W.M. Jones
2016-05-17 15:54         ` Richard W.M. Jones
2016-05-17 16:26           ` Alex Bligh
2016-05-17 17:00             ` Eric Blake
2016-02-16 16:34 ` [Qemu-devel] [PULL 24/28] nbd: use "" as a default export name if none provided Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 25/28] nbd: implement TLS support in the protocol negotiation Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 26/28] nbd: enable use of TLS with NBD block driver Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 27/28] nbd: enable use of TLS with qemu-nbd server Paolo Bonzini
2016-02-16 16:34 ` [Qemu-devel] [PULL 28/28] nbd: enable use of TLS with nbd-server-start command Paolo Bonzini
2016-02-16 18:25 ` [Qemu-devel] [PULL 00/28] Bug fixes + NBD-over-TLS support patches for 2016-02-16 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=1455640486-6101-6-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.