Re: [PATCH v2 1/2] compiler-clang.h: Add CLANG_VERSION and __diag macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nick,

On Fri, Aug 31, 2018 at 11:50 PM, Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
> + Miguel and Joe
>
> This is the old patch I had sent for detecting Clang version.  If we
> wanted to set a minimal version, this plus the actual version should
> do it.  Probably could drop the diag stuff, as we changed clang to not
> warn in this case, so my solution using _Pragma is obsolete.

Nitpick: do we want to use the CLANG_VERSION notation? In some cases I
think it is easier to simply use directly the original values (like I
did in compiler_attributes.h for gcc).

Consider that we almost never need the patchlevel (and if we do, it is
better to *see* we are explicitly testing for it), and given the
versioning schemes that compilers nowadays use (i.e. only major
versions), I would bet not even the minor (except maybe for GCC in
compiler_attributes.h until we drop gcc < 5).

Cheers,
Miguel



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux