From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Date: Wed, 5 Sep 2018 13:42:58 -0400 Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Yann Droneaud Cc: moderated for non-subscribers , David Airlie , Greg KH , Jason Wang , Mat Martineau , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, David Howells , Masahiro Yamada , keyrings@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Kent Overstreet , linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Dan Williams , Jaroslav Kysela , Jan Harkes , Michal Marek linux List-Id: alsa-devel@alsa-project.org T24gV2VkLCBTZXAgMDUsIDIwMTggYXQgMDc6MzM6MzhQTSArMDIwMCwgWWFubiBEcm9uZWF1ZCB3 cm90ZToKPiBIaSwKPiAKPiBMZSBtZXJjcmVkaSAwNSBzZXB0ZW1icmUgMjAxOCDDoCAxODo1NSAr MDIwMCwgR3JlZyBLSCBhIMOpY3JpdCA6Cj4gPiBPbiBXZWQsIFNlcCAwNSwgMjAxOCBhdCAwNDo1 NDoyN1BNICswMTAwLCBEYXZpZCBIb3dlbGxzIHdyb3RlOgo+ID4gPiAKPiA+ID4gSGVyZSdzIGEg c2V0IG9mIHBhdGNoZXMgdGhhdCBpbnNlcnRzIGEgc3RlcCBpbnRvIHRoZSBidWlsZCBwcm9jZXNz IHRv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fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1k ZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcv bWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Date: Wed, 05 Sep 2018 17:42:58 +0000 Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Message-Id: <20180905133711-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable List-Id: References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> In-Reply-To: To: Yann Droneaud Cc: moderated for non-subscribers , David Airlie , Greg KH , Jason Wang , Mat Martineau , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, David Howells , Masahiro Yamada , keyrings@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Kent Overstreet , linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Dan Williams , Jaroslav Kysela , Jan Harkes , Michal Marek linux On Wed, Sep 05, 2018 at 07:33:38PM +0200, Yann Droneaud wrote: > Hi, >=20 > Le mercredi 05 septembre 2018 =E0 18:55 +0200, Greg KH a =E9crit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > >=20 > > > Here's a set of patches that inserts a step into the build process to= make > > > sure that the UAPI headers can all be built together with C++ (if the > > > compiler being used supports C++). All but the final patch perform f= ixups, > > > including: > >=20 > > Wait, why do we care? What has recently changed to start to directly > > import kernel uapi files into C++ code? > >=20 > > And if userspace wants to do this, can't they do the C namespace trick > > themselves when they do the import? That must be how they are doing it > > today, right? > >=20 >=20 > They can't. >=20 >=20 > Adding extern "C" { } doesn't magically make "class" a non keyword. > Even if it was the case, writing C++ code using whatever->class would > probably broke because class is a keyword in C++. I think it's a bug in the language TBH. > --=20 > Yann Droneaud > OPTEYA >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbeIEWOT (ORCPT ); Wed, 5 Sep 2018 18:14:19 -0400 Date: Wed, 5 Sep 2018 13:42:58 -0400 From: "Michael S. Tsirkin" Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Yann Droneaud Cc: Greg KH , David Howells , linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org, Michal Marek , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, keyrings@vger.kernel.org, David Airlie , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Rob Clark , linux-arm-msm@vger.kernel.org, Kent Overstreet , Dan Williams , Takashi Iwai , linux-bcache@vger.kernel.org, Coly Li , Jaroslav Kysela , Jan Harkes , Masahiro Yamada , Ryusuke Konishi , Jason Wang , Mat Martineau , netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, moderated for non-subscribers , freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org On Wed, Sep 05, 2018 at 07:33:38PM +0200, Yann Droneaud wrote: > Hi, > > Le mercredi 05 septembre 2018 à 18:55 +0200, Greg KH a écrit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > > > > > Here's a set of patches that inserts a step into the build process to make > > > sure that the UAPI headers can all be built together with C++ (if the > > > compiler being used supports C++). All but the final patch perform fixups, > > > including: > > > > Wait, why do we care? What has recently changed to start to directly > > import kernel uapi files into C++ code? > > > > And if userspace wants to do this, can't they do the C namespace trick > > themselves when they do the import? That must be how they are doing it > > today, right? > > > > They can't. > > > Adding extern "C" { } doesn't magically make "class" a non keyword. > Even if it was the case, writing C++ code using whatever->class would > probably broke because class is a keyword in C++. I think it's a bug in the language TBH. > -- > Yann Droneaud > OPTEYA > From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Date: Wed, 5 Sep 2018 13:42:58 -0400 Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Yann Droneaud Cc: moderated for non-subscribers , David Airlie , Greg KH , Jason Wang , Mat Martineau , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, David Howells , Masahiro Yamada , keyrings@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Kent Overstreet , linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Dan Williams , Jaroslav Kysela , Jan Harkes , Michal Marek , linux T24gV2VkLCBTZXAgMDUsIDIwMTggYXQgMDc6MzM6MzhQTSArMDIwMCwgWW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kb2Vzbid0IG1hZ2ljYWxseSBtYWtlICJjbGFzcyIgYSBub24g a2V5d29yZC4KPiBFdmVuIGlmIGl0IHdhcyB0aGUgY2FzZSwgd3JpdGluZyBDKysgY29kZSB1c2lu ZyB3aGF0ZXZlci0+Y2xhc3Mgd291bGQKPiBwcm9iYWJseSBicm9rZSBiZWNhdXNlIGNsYXNzIGlz IGEga2V5d29yZCBpbiBDKysuCgpJIHRoaW5rIGl0J3MgYSBidWcgaW4gdGhlIGxhbmd1YWdlIFRC SC4KCj4gLS0gCj4gWWFubiBEcm9uZWF1ZAo+IE9QVEVZQQo+IApfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1k ZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcv bWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2E72F2111B78D for ; Wed, 5 Sep 2018 10:43:06 -0700 (PDT) Date: Wed, 5 Sep 2018 13:42:58 -0400 From: "Michael S. Tsirkin" Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Yann Droneaud Cc: moderated for non-subscribers , David Airlie , Greg KH , Jason Wang , Mat Martineau , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, David Howells , Masahiro Yamada , keyrings@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Kent Overstreet , linux-kbuild@vger.kernel.org, linux-arm-msm@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Jaroslav Kysela , Jan Harkes , Michal Marek , linux-api@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Rob Clark , netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, freedreno@lists.freedesktop.org List-ID: On Wed, Sep 05, 2018 at 07:33:38PM +0200, Yann Droneaud wrote: > Hi, > = > Le mercredi 05 septembre 2018 =E0 18:55 +0200, Greg KH a =E9crit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > > = > > > Here's a set of patches that inserts a step into the build process to= make > > > sure that the UAPI headers can all be built together with C++ (if the > > > compiler being used supports C++). All but the final patch perform f= ixups, > > > including: > > = > > Wait, why do we care? What has recently changed to start to directly > > import kernel uapi files into C++ code? > > = > > And if userspace wants to do this, can't they do the C namespace trick > > themselves when they do the import? That must be how they are doing it > > today, right? > > = > = > They can't. > = > = > Adding extern "C" { } doesn't magically make "class" a non keyword. > Even if it was the case, writing C++ code using whatever->class would > probably broke because class is a keyword in C++. I think it's a bug in the language TBH. > -- = > Yann Droneaud > OPTEYA > = _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbeIEWOT (ORCPT ); Wed, 5 Sep 2018 18:14:19 -0400 Date: Wed, 5 Sep 2018 13:42:58 -0400 From: "Michael S. Tsirkin" To: Yann Droneaud Cc: Greg KH , David Howells , linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org, Michal Marek , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, keyrings@vger.kernel.org, David Airlie , linux-nilfs@vger.kernel.org, linux-nvdimm@lists.01.org, codalist@coda.cs.cmu.edu, coda@cs.cmu.edu, coreteam@netfilter.org, Rob Clark , linux-arm-msm@vger.kernel.org, Kent Overstreet , Dan Williams , Takashi Iwai , linux-bcache@vger.kernel.org, Coly Li , Jaroslav Kysela , Jan Harkes , Masahiro Yamada , Ryusuke Konishi , Jason Wang , Mat Martineau , netfilter-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, moderated for non-subscribers , freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++ Message-ID: <20180905133711-mutt-send-email-mst@kernel.org> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> <20180905165552.GB25206@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Sep 05, 2018 at 07:33:38PM +0200, Yann Droneaud wrote: > Hi, > > Le mercredi 05 septembre 2018 � 18:55 +0200, Greg KH a �crit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > > > > > Here's a set of patches that inserts a step into the build process to make > > > sure that the UAPI headers can all be built together with C++ (if the > > > compiler being used supports C++). All but the final patch perform fixups, > > > including: > > > > Wait, why do we care? What has recently changed to start to directly > > import kernel uapi files into C++ code? > > > > And if userspace wants to do this, can't they do the C namespace trick > > themselves when they do the import? That must be how they are doing it > > today, right? > > > > They can't. > > > Adding extern "C" { } doesn't magically make "class" a non keyword. > Even if it was the case, writing C++ code using whatever->class would > probably broke because class is a keyword in C++. I think it's a bug in the language TBH. > -- > Yann Droneaud > OPTEYA >