Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2106661imm; Thu, 23 Aug 2018 14:21:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyfmdddOHIiSYBN15lNsTJM7XCBTBkjhHBqQNRIVd/sht+g9BKlhXZ6aDidsTGCHkODHEO1 X-Received: by 2002:a17:902:b283:: with SMTP id u3-v6mr26433566plr.2.1535059292255; Thu, 23 Aug 2018 14:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535059292; cv=none; d=google.com; s=arc-20160816; b=TLpU4SnpqW0eQRtcRF19ssw27a802bj8ZrXKbq4TaUSL9ArmWBMdS3r0Pb/ZLI4MW9 nS0QZtiMiVroL5ayafgD1f7eX9n5YlMVdTZ3VqWQYRxGS1zR1LFrqb+u3xFvuYgeFWWJ xi8BSfU1lPaYRuK6MYvA2JmHqRRtBcd7LXzs1DRdFVDixATZR6Tc4LjVOlS2ZZrnlXJc IL1OTl2kpeuMTYBjjz31d1w8RNJgsuPbSX+rWtNs7FC2EN7QfYe3+6q5cM2D8wz2kUBl jMq1L1wodrLR92QXFkRf2+0jVHx1HhgygH1KluNSsogHAQFJCxttKfpUO5oUbZFGFYUS yqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=BfBBy2RPb1O5vtdXBj4mos1W3PbCl6LbGrT7CQbxxbo=; b=w/4Y38JEMElTL5C4LRXBAESh9n+sdRk0yV3X7KJrJmwB8P/jSJ7hEqGsZxvloJPf+W SX9sHV01n7PQM/VSyn9PdLs4xFD+PVutJPn2zwayGYTUeEjqC5VCqwiZgisBpZoikrR1 QWRjwfmNqnR0f1joiHiDFCp7+pTVn9N0KA7V7r3UpnE0+hE3AeQDs/F8Gqva0FZDwWNz BbAiR7ATIfVvmexLU1/15uoL6BiiNc6Uv5BSc4AdIEq6RPz8CLuWCh9BqejC8nbfEm2Y nEUC2YCWae/uPpvKsjxx9fMgFkQEPXM1VsYXzyi4ENDFUd7rtXS09O168smHHhIM631R Hh0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31-v6si5059409pla.479.2018.08.23.14.21.16; Thu, 23 Aug 2018 14:21:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728183AbeHXAun (ORCPT + 99 others); Thu, 23 Aug 2018 20:50:43 -0400 Received: from smtprelay0195.hostedemail.com ([216.40.44.195]:43275 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727153AbeHXAun (ORCPT ); Thu, 23 Aug 2018 20:50:43 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 0078C18225AF8; Thu, 23 Aug 2018 21:19:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2559:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6117:6119:6248:6742:7903:8957:8985:9025:10004:10400:10848:11026:11027:11232:11473:11658:11914:12043:12048:12295:12438:12663:12740:12760:12895:13069:13311:13357:13439:14180:14181:14659:14721:14777:21060:21080:21433:21451:21627:30034:30054:30070:30083:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:34,LUA_SUMMARY:none X-HE-Tag: blood61_15724effc0d4a X-Filterd-Recvd-Size: 2984 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Thu, 23 Aug 2018 21:19:07 +0000 (UTC) Message-ID: Subject: Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive From: Joe Perches To: Nick Desaulniers , Kees Cook , asmadeus@codewreck.org, Linus Torvalds , Masahiro Yamada Cc: Jonathan Corbet , Arnd Bergmann , dwmw@amazon.co.uk, LKML , Thomas Gleixner , Will Deacon , Geert Uytterhoeven , Ingo Molnar , Andrew Morton , daniel@iogearbox.net, hpa@zytor.com Date: Thu, 23 Aug 2018 14:19:06 -0700 In-Reply-To: References: <20180822233724.110454-1-ndesaulniers@google.com> <20180823002508.GA822@nautica> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wrote: > > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > > > +/* Compiler specific macros. */ > > > #ifdef __clang__ > > > #include > > > > 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__(()) 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