From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729735AbeIFTMu (ORCPT ); Thu, 6 Sep 2018 15:12:50 -0400 Date: Thu, 6 Sep 2018 10:36:59 -0400 From: "Michael S. Tsirkin" Subject: Re: [PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members Message-ID: <20180906101318-mutt-send-email-mst@kernel.org> References: <20180905125636-mutt-send-email-mst@kernel.org> <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <153616289529.23468.7498785670556620808.stgit@warthog.procyon.org.uk> <9357.1536217759@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9357.1536217759@warthog.procyon.org.uk> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: David Howells Cc: linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org, Jason Wang , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org On Thu, Sep 06, 2018 at 08:09:19AM +0100, David Howells wrote: > Michael S. Tsirkin wrote: > > > As long as you do not intend to use any classes, how about > > simply adding > > > > -Dclass=_class > > > > to your command line? > > That kind of misses the point;-). It's not reasonable to expect all userspace > C++ users to do this. > > David I thought one of the points was that building kernel with c++ catches some bugs, no? If the point is to make life easier for c++ userspace I'm not sure what we can do to be frank. C++ seems to be adding new keywords with no restraint (C99 did it with inline and restrict too, but it seems this stopped) so no good way to future-proof code for all language dialects. So I'd like to know which are the actual c++ users asking for this - we can then accomodate the specific version they need. Meanwhile people can get by with a wrapper along the lines of #define class _class #include #undef class -- MST