From: Alexey Dobriyan <adobriyan@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, dhowells@redhat.com
Subject: Re: [RFC] UAPI: Check headers by compiling all together as C++
Date: Fri, 14 Sep 2018 01:01:24 +0300 [thread overview]
Message-ID: <20180913220124.GA12570@avx2> (raw)
In-Reply-To: <20180905222247.GT19965@ZenIV.linux.org.uk>
On Wed, Sep 05, 2018 at 11:22:47PM +0100, Al Viro wrote:
> On Wed, Sep 05, 2018 at 10:31:11PM +0300, Alexey Dobriyan wrote:
> > On Wed, Sep 05, 2018 at 09:26:36PM +0200, Greg KH wrote:
> > > On Wed, Sep 05, 2018 at 09:59:22PM +0300, Alexey Dobriyan wrote:
> > > > > 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?
> > > >
> > > > I think David is seriously trying to compile kernel with C++ compiler
> > > > and this is first step.
> > > >
> > > > He isn't alone. Resistance is futile. :^)
> > >
> > > "struct class" is going to be a hard one to overcome :)
> >
> > "struct class" makes you hostis publicus #1 of the Linux++ empire. :^)
>
> Don't tempt me...
<= g++-8 doesn't support C99 style initializers.
g++-8 mostly does: for example
.foo = {
[BAR] = 1,
},
doesn't work, but regular .foo = 42 does.
Additionally, g++ makes noise about order of initializators.
C++20 is supposed to make things better.
g++ supports -fpermissive which is a blessing.
clang doesn't support -fpermissive which makes everything way more
tedious and it has problems with alternatives (and IIRC vdso code).
Now with gcc version bumped recently I think __attribute__((cleanup))
is supported which makes destructor-like behaviour possible:
with_spinlock(&p->l) {
return 0;
}
with_mutex(&m) {
}
with_rcu() {
}
next prev parent reply other threads:[~2018-09-13 22:01 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 18:59 Alexey Dobriyan
2018-09-05 19:26 ` Greg KH
2018-09-05 19:31 ` Alexey Dobriyan
2018-09-05 22:22 ` Al Viro
2018-09-13 22:01 ` Alexey Dobriyan [this message]
2018-09-13 22:15 ` Al Viro
2018-09-13 23:27 ` David Howells
2018-09-13 23:42 ` Al Viro
2018-09-05 19:53 ` David Howells
-- strict thread matches above, loose matches on Subject: below --
2018-09-06 9:18 David Howells
2018-09-06 9:18 ` David Howells
2018-09-06 9:18 ` David Howells
2018-09-06 9:18 ` David Howells
2018-09-06 9:18 ` David Howells
2018-09-06 9:18 David Howells
2018-09-05 15:54 David Howells
2018-09-05 15:54 ` David Howells
2018-09-05 15:54 ` David Howells
2018-09-05 15:54 ` David Howells
2018-09-05 15:54 ` David Howells
2018-09-05 16:55 ` Greg KH
2018-09-05 16:55 ` Greg KH
2018-09-05 16:55 ` Greg KH
2018-09-05 16:55 ` Greg KH
2018-09-05 16:55 ` Greg KH
2018-09-05 17:33 ` Yann Droneaud
2018-09-05 17:33 ` Yann Droneaud
2018-09-05 17:33 ` Yann Droneaud
2018-09-05 17:33 ` Yann Droneaud
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-05 17:42 ` Michael S. Tsirkin
2018-09-06 7:12 ` Yann Droneaud
2018-09-06 7:12 ` Yann Droneaud
2018-09-06 7:12 ` Yann Droneaud
2018-09-06 7:12 ` Yann Droneaud
2018-09-05 19:22 ` Jan Engelhardt
2018-09-05 19:22 ` Jan Engelhardt
2018-09-05 19:22 ` Jan Engelhardt
2018-09-05 19:22 ` Jan Engelhardt
2018-09-05 19:22 ` Jan Engelhardt
2018-09-05 17:50 ` David Howells
2018-09-05 17:50 ` David Howells
2018-09-05 17:50 ` David Howells
2018-09-05 15:54 David Howells
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=20180913220124.GA12570@avx2 \
--to=adobriyan@gmail.com \
--cc=dhowells@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
--subject='Re: [RFC] UAPI: Check headers by compiling all together as C++' \
/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
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.