Thread (37 messages) 37 messages, 9 authors, 2018-10-09

Re: [RFC] UAPI: Check headers by compiling all together as C++

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2018-09-05 22:14:19
Also in: alsa-devel, dri-devel, keyrings, linux-api, linux-arm-msm, linux-bcache, linux-fsdevel, linux-kbuild, netfilter-devel, nvdimm

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 :
quoted
On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help