From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVfcu-0004VN-Nb for qemu-devel@nongnu.org; Tue, 16 Feb 2016 08:25:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVfct-00062R-RM for qemu-devel@nongnu.org; Tue, 16 Feb 2016 08:25:12 -0500 Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:33898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVfct-00062J-Jf for qemu-devel@nongnu.org; Tue, 16 Feb 2016 08:25:11 -0500 Received: by mail-vk0-x22c.google.com with SMTP id e185so132698995vkb.1 for ; Tue, 16 Feb 2016 05:25:11 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1455043788-28112-1-git-send-email-eblake@redhat.com> References: <1455043788-28112-1-git-send-email-eblake@redhat.com> From: Peter Maydell Date: Tue, 16 Feb 2016 13:24:51 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] build: Don't redefine 'inline' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: QEMU Developers On 9 February 2016 at 18:49, Eric Blake 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 > --- > 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