[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=qXM=jEULGsWup+AtUTMTd_T-LHLY8iNna5y+zN3E6UA@mail.gmail.com>
Date: Sun, 8 Sep 2019 15:55:33 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Segher Boessenkool <segher@...nel.crashing.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Jakub Jelinek <jakub@...hat.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
"gcc-patches@....gnu.org" <gcc-patches@....gnu.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v2 4/6] compiler-gcc.h: add asm_inline definition
On Sat, Sep 7, 2019 at 3:11 PM Segher Boessenkool
<segher@...nel.crashing.org> 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
Powered by blists - more mailing lists