Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1327012ybe; Thu, 5 Sep 2019 13:50:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqx26ShfRGAE2iekL1KjAbrxuwl8tp5q6Y+RU7UU9cF3665ZVdGF1AAq+XbreCQ4Q2yg7iy1 X-Received: by 2002:a63:d615:: with SMTP id q21mr4836701pgg.296.1567716656644; Thu, 05 Sep 2019 13:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567716656; cv=none; d=google.com; s=arc-20160816; b=l4tFDjTEdE/CxVkRQvHI28zFV3skZ+m0Ue0hEkmJMT55yto7cFTGrfB1//atjDJohV JwFNUcFOo0VyCbmMpYFcrRZQYjur6TfB40ShdvaGIaao7RbtH/KZe4HqpAi3l1s2g9me Mhn3Qekp5CrCuw3t39DjKsAfNroSmPuv+Xp1WNzbyZw20vdiTujKtDg1w4XIl4JBkOTN +yw5JYd+utLcnm68N8NZvKL6nfnPhoADQO6ZFsInmYGdTFNnmvsCGUiXeRz4n42YAoGC xnh40ve0GKKDImhEsSAKyQJ1ClY6kZo6tUYVbUcSe8xQ3uucxbwb81Lke2Fi0JCFytma 9wOA== 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=r7k75Od2gh5LmViyuPr3vhw7Ofp/g49ZOss6B4NPSWM=; b=BjaMx4cL6gzXUclzLLSoiLHuST1LhbyyOM3U6ladpqVTHR6Y6gCNoXkFs1lQKynjbh T2ZgBxN6nM9HivAWkXTlbDYyBspl89SQSKv8ZJn9AElTgyCVKE/vQXCo3Eqcj/6vP3v8 I0cOTmdV15v5I8tNBCL6AXm/fQtHGzdcJG6n/z0CGcHPqnNu0LgbiTpaDpzGyQrmqYyN cxJTvBiZy6C1xHfy35GrP18CBb06E+EJDmQVxdxj/IUhu2pMtsZVayvfSLNHqU/MpZhD AoUxk3MhDixrHGnpvisdsKFqajGeas5vMf/UDK2ZyVjLaDsQ8QNwLuYux4pPkm//7hrb dLOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FPq9707g; 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 t5si1625601pjr.9.2019.09.05.13.50.40; Thu, 05 Sep 2019 13:50:56 -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=FPq9707g; 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 S2389178AbfIEPw5 (ORCPT + 99 others); Thu, 5 Sep 2019 11:52:57 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:41914 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389115AbfIEPw5 (ORCPT ); Thu, 5 Sep 2019 11:52:57 -0400 Received: by mail-lf1-f68.google.com with SMTP id j4so2452819lfh.8 for ; Thu, 05 Sep 2019 08:52:56 -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=r7k75Od2gh5LmViyuPr3vhw7Ofp/g49ZOss6B4NPSWM=; b=FPq9707giVrG4ysDfw7c8kDWCpm5XtS/zj9wkNncf5wWV7GRxTjPpVycERPPbqt8jm X5hfp3nF454H676p+DmhNaAfUIUkyK1jffE+b4OsOMEFVr7hyKCFaoTppQGz49k3cIDQ koertEzb7gAJnCno/XyJ7MIGzTATCivJrEHnr2sED309rwYf4k2Gk/HW8GTPzyKkXi7c +rmkhfdNXKHSGgpUP0kbGcTochyAYB5YfurrC7A2sQQmsLVrcxtQUl6IbFNKn8xf6RCc JyZnhry0M9ePYM1NWmUz3I1tvlJt6+YqL/HYVoyr5PaxCLGE3meENdmzh1MfofAyndE+ TY/Q== 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=r7k75Od2gh5LmViyuPr3vhw7Ofp/g49ZOss6B4NPSWM=; b=H6hI7XhyksmUDyM9PkxVwhgAFQAfPB++gr0kp4PuhIyI9nVC4EL4Fc9VM7xiwwmhg/ 12bc+Jq5QjxH/wrrMnsK6rgqyGwBfeEHkxyPyk4lQGDiW17kQdiqxHb10zsP3k0jUwCz Hasnb9sScmcXLd7y89bNYXh969nLZcdlxaD3nJwPgoF4daXnJJZE5dui3A9HNNxqnbeN xR3TEgOyRl9i/S2QqNTmJKOiNA1fsJZeLDDz1cTNSbXbgVhWQpSuqTS8sKZiCSv42R9k I9e2agGjsRDnfPAmOsnLydRhKlXuUc0U9pIKxNNsj/AvEbHJ9dXWGS2HfoxR0QOZ0IG/ C3hQ== X-Gm-Message-State: APjAAAV3l/rvHgLfJk+2hBzvmJPq5EAVB8NpKjCwF98P2U6dLUY50kl+ 2y0CCSo20cWCajT9EC3I5F56Chg0gN36VVbyqCQ= X-Received: by 2002:ac2:5090:: with SMTP id f16mr3008694lfm.66.1567698775732; Thu, 05 Sep 2019 08:52:55 -0700 (PDT) MIME-Version: 1.0 References: <20190829083233.24162-1-linux@rasmusvillemoes.dk> <20190830231527.22304-1-linux@rasmusvillemoes.dk> <20190830231527.22304-5-linux@rasmusvillemoes.dk> <20190905134535.GP9749@gate.crashing.org> In-Reply-To: <20190905134535.GP9749@gate.crashing.org> From: Miguel Ojeda Date: Thu, 5 Sep 2019 17:52:44 +0200 Message-ID: Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition To: Segher Boessenkool Cc: Rasmus Villemoes , Nick Desaulniers , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , "gcc-patches@gcc.gnu.org" 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 Thu, Sep 5, 2019 at 3:45 PM Segher Boessenkool wrote: > > [ That's not what a feature test macro is; a feature test macro allows the > user to select some optional behaviour. Things like _GNU_SOURCE. ] Yes and no. GNU libc defines feature test macros like you say, but C++'s feature macros are like Rasmus/Nick are saying. I think libc's definition is weird, I would call those "feature selection macros" instead, because the user is selecting between some features (whether to enable or not, for instance), rather than testing for the features. > Why would GCC want to have macros for all features it has? That would be > quite a few new ones every release. Maybe GCC wouldn't, but its users, they surely would. For anything that 1) is a new language feature, 2) breaks backwards-compatibility with previous (or other compilers) and 3) is expected to be used by end users, yes, it would be very useful to have. For the same reasons C++ is adding feature test macros all over the place nowadays and it is considered good practice (see SD-6: SG10 Feature Test Recommendations). Cheers, Miguel