Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4502836ybe; Mon, 9 Sep 2019 10:10:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5woZCfLl/TBuvvaVm5zoc78FaW+6OGIeiY1XRdJwWSRP84O1834M0sun6pV4/ufmGqx5t X-Received: by 2002:a50:bb22:: with SMTP id y31mr26165025ede.58.1568049019406; Mon, 09 Sep 2019 10:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568049019; cv=none; d=google.com; s=arc-20160816; b=flhXaoKbSMx2oOAHJfI/qs8u1yF/JCA0KJuepXUjvpCxevuwKKlcmnaT4Dh7w0VKBF Hbo8xaPNtsk/4YmBuIiLtUZKVl4ixBEOiqmpmSQvNu4hmZ5gMs8HVJKUpQdIaKANyf5b rPfSv3meDBELQd+hAeyt+1ruk89V5Bbx7LKJLr/VsKNN7isdBddQXoszBaRttgrdhjQ9 pS7dMHaHNnIp38izW1aK+S6NWc4LuiVath/T4djCTmBDqHxVfl2vrt11/VVe1mxmgVkV Mnrk+BltCDM1vHWRKmeY3han1Qj3Lwg9tXjiT9dWAWTHW8MdYU9NijK0QvpP6pKspi7w f3jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sF4vWdoCClkvUWmjG7SmHm1u0cF208Pq+GV3iOlmbEI=; b=o/TrCeL1r+ebx6+uFiytrXmXBk1yw+5tEykD4fHrqRMIQRi5QdVdOxtTtf6wA4++HJ 4lgb6zkpnbWSA8jaezdYUgfKWwr0S+mtYprnCmhMfRgLDZn3kl1m6rUWYd/1/YTrFYjq GO6UXSPnrLJyopImI8DBAYjxcJCB3U2dsz6wlV0FOCMidziZ1zTcRAmaR3PVB9aa+COB zGTkjAapgnr2W9Zxtrt3Y/hl0y4IuIZT9z5jwighkTodiJUqF3flfvJ5ZV7sIjueIu4T BmFrAY/P5bFKBzUDqyGHN3svBsfm04vP9ISktRlRaGF4cVV9FbwqgWsW/OtbcUrzmkAX RJlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NH6YvOJS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14si10141092ede.320.2019.09.09.10.09.55; Mon, 09 Sep 2019 10:10:19 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NH6YvOJS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728814AbfIHNzr (ORCPT + 99 others); Sun, 8 Sep 2019 09:55:47 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:41484 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbfIHNzr (ORCPT ); Sun, 8 Sep 2019 09:55:47 -0400 Received: by mail-lf1-f68.google.com with SMTP id j4so8445995lfh.8 for ; Sun, 08 Sep 2019 06:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sF4vWdoCClkvUWmjG7SmHm1u0cF208Pq+GV3iOlmbEI=; b=NH6YvOJSA9BJfe/rK/M7Q6vmL9hZIe9PTLc+Y+OMDga80Q/mee05priLhuNAkAUkSz DrsUwg4SDM1aGyMx82DnFOxjPj1ss713Rbztz7ExMqNR7ylXtnymBcAUftlrMvEKo6Dm mMJnh5q7MKqwES2oTvbszAwrHAu+mQdRnh345RvbVsujxWUPSpi4cJFQ21nd/8yHZyGM HNDCM6uTyCNUp83BFOh0nnUbapnrvbjZecH9/yLUh9nmswm0Di10QUR17VxsM1Wg+5Y3 05QA/4KgLlLkQ/GWvrbM1hoZ6oRLBOwxXGieCxhavj/+t0Yzr8FzBCB/nVGWN4YDHxGq 0sSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sF4vWdoCClkvUWmjG7SmHm1u0cF208Pq+GV3iOlmbEI=; b=lQ7xVlZIt9uNFaZ5pzxe7ssFpeA+GtBQcbhlf4ts0Fkm88vaUXStcSeLFYdeJZ2YpU minvDud3E6SXLvyozXw/r/nDaEQ2XrD9QznDaxJ23YpDkjlsUFZSZdx43rlaxBlYKIMn ddoXpTswT3xlPT2dgyWuDPNHqinMQT4dcHrU4ZLrbAd3Bwrx/W1PCWHVTxSe3F36xhrP 1I4MV/q7UB+0FOd4TiLAu16d8WgQ1e6fRFufgRF9T4fMoewSPwTi3miS3hGbdFJQHXyH xNNRpjUZs8TXNCD4mYydd+FIaMguR7CQBQ4R6spWQx/YCIFSrHXcI+sJt1x82LsG04I2 aFnA== X-Gm-Message-State: APjAAAXdiccctJ9UUFaoJGm7Zq1/X8Vgi1tuMV2XJtZQeW88Fs+Q6DbX 1bcP8vd2qfP+e8sMZQkkvBHyUMm/I7aYdfhjrig= X-Received: by 2002:a19:428f:: with SMTP id p137mr13288714lfa.149.1567950945057; Sun, 08 Sep 2019 06:55:45 -0700 (PDT) MIME-Version: 1.0 References: <20190906163028.GC9749@gate.crashing.org> <20190906163918.GJ2120@tucnak> <20190906220347.GD9749@gate.crashing.org> <20190906225606.GF9749@gate.crashing.org> <20190907001411.GG9749@gate.crashing.org> <20190907131127.GH9749@gate.crashing.org> In-Reply-To: <20190907131127.GH9749@gate.crashing.org> From: Miguel Ojeda Date: Sun, 8 Sep 2019 15:55:33 +0200 Message-ID: Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition To: Segher Boessenkool Cc: Nick Desaulniers , Jakub Jelinek , Rasmus Villemoes , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , "gcc-patches@gcc.gnu.org" , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 7, 2019 at 3:11 PM Segher Boessenkool wrote: > > I wouldn't. Please stop using that straw man. I'm not saying version > checks are good, or useful for most things. I am saying they are not. > > Predefined compiler symbols to do version checking (of a feature) is > just a lesser instance of the same problem though. (And it causes its > own more or less obvious problems as well). That is fair enough, but what are you suggesting we use, then? Because "testing to do X to know if you can do X" cannot work with source code alone and implies each project has to redo this work in its build system for each compiler, plus each project ends up with different names for these macros. The C++20 approach of having standardized macros for major features is way better (whether we have one macro per feature or a __has_feature(X) macro). Note this does not mean we need to take this to the extreme and have a feature-test macro for *every* feature, bugfix or behavior change as a macro. Cheers, Miguel