mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nick Desaulniers <ndesaulniers@google.com>,
	Kees Cook <keescook@chromium.org>,
	asmadeus@codewreck.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
	dwmw@amazon.co.uk, LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will.deacon@arm.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	daniel@iogearbox.net, hpa@zytor.com
Subject: Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive
Date: Thu, 23 Aug 2018 14:19:06 -0700	[thread overview]
Message-ID: <e5d579d8ef832fbc133e96746ceb6edbd0870cc2.camel@perches.com> (raw)
In-Reply-To: <CAKwvOdmJoEotNMUm=YkuvfAdihnB4SUhbZrc2PDEBScfdrvOjQ@mail.gmail.com>

On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote:
> One reply for a bunch of the various threads, to keep the number of emails down:
> 
> On Wed, Aug 22, 2018 at 5:20 PM Joe Perches <joe@perches.com> wrote:
> > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote:
> > > +/* Compiler specific macros. */
> > >  #ifdef __clang__
> > >  #include <linux/compiler-clang.h>
> > 
> > probably better as
> > 
> > #if defined(__clang)
> > 
> > to match the style of the #elif defined()s below it
> 
> Hi Joe,
> Thanks for the feedback. I always appreciate it.  If you have some
> cleanups, want to send them to me, and I'll bundle them up for a PR?
> I'm ok with that change.
> 
> > > +#ifdef __GNUC_STDC_INLINE__
> > > +# define __gnu_inline        __attribute__((gnu_inline))
> > > +#else
> > > +# define __gnu_inline
> > > +#endif
> > 
> > Perhaps __gnu_inline should be in compiler-gcc and this
> > should use
> > 
> > #ifndef __gnu_inline
> > #define __gnu_inline
> > #endif
> 
> Not this case; it's how we get gnu89 semantics for `extern inline` is
> not compiler specific (therefor should not go in a compiler specific
> header).

It's not possible to know that compilers support what
__attribute__((<foo>)) and at what version that support
exists unless it is specified somewhere.

As far as I can tell,  gnu_inline is not recognized by clang.

https://clang.llvm.org/docs/AttributeReference.html


  parent reply	other threads:[~2018-08-23 21:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 23:37 Nick Desaulniers
2018-08-23  0:20 ` Joe Perches
2018-08-23  0:21 ` Linus Torvalds
2018-08-23  0:25 ` Dominique Martinet
2018-08-23  1:02   ` Linus Torvalds
2018-08-23  1:10     ` Dominique Martinet
2018-08-23  1:13       ` Linus Torvalds
2018-08-23  8:32     ` Kees Cook
2018-08-23 21:03       ` Nick Desaulniers
2018-08-23 21:10         ` Joe Perches
2018-08-23 21:19         ` Joe Perches [this message]
2018-08-23 23:12           ` Nick Desaulniers
2018-08-23 23:31             ` Joe Perches
2018-08-26 17:37               ` Miguel Ojeda
2018-08-23 22:08         ` Dominique Martinet
2018-08-23  2:42 ` Masahiro Yamada

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=e5d579d8ef832fbc133e96746ceb6edbd0870cc2.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=asmadeus@codewreck.org \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    --cc=dwmw@amazon.co.uk \
    --cc=geert@linux-m68k.org \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®