search for: __has_attribute

Displaying 5 results from an estimated 5 matches for "__has_attribute".

2017 Feb 15
3
about "cpu.h: Fix compiler detection" patch
...e undefined for GCC, so intrinsic versions of functions are not compiled into libFLAC. Previously, the code was: #if defined __INTEL_COMPILER // definitions for ICC #elif defined _MSC_VER // definitions for MSVC #elif defined __GNUC__ || defined __clang__ #if defined __clang__ && __has_attribute(__target__) // definitions for newer clang #elif !defined __clang__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) // definitions for newer GCC #else // definitions for older GCC and clang #endif #endif Now, it's basically: #if...
2017 Feb 16
1
about "cpu.h: Fix compiler detection" patch
Erik de Castro Lopo wrote: > the bug *before* the logic is evaluated. My current solution in > the above PR is to avoid `__has_attribute` and use this: > > #elif defined __clang__ && (__clang_major__ > 3 || \ > (__clang_major__ == 3 && __clang_minor__ >= 6)) /* clang */ > > which I have tested with clang 3.6. If someone has an earlier version > of clang and can verify that it wor...
2018 Jun 12
0
[PATCH v4 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
...onfig for >> 4.18-rc1 offers possibilities to check for cc-version dependencies. > >Those will be helpful. If we want to pursue compiler flags, which get >set some Makefiles, then yes. But I think a simpler change to my >patch would be as below. > >It seems gcc did not get __has_attribute [0] until 5.1, but will >define __GNUC_GNU_INLINE__ if supported. [1] Unfortunately, Clang >does not define __GNUC_GNU_INLINE__ [2]. So a proper feature test >might look like: > >``` >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif > >#if defined(__GNUC...
2015 Dec 21
2
MSVC warning noise on "LLVM_ATTRIBUTE_ALWAYS_INLINE inline void foo()"
...cause functions with MSVC that are marked > LLVM_ATTRIBUTE_ALWAYS_INLINE but not 'inline' to not be inlined? > __forceinline means that MSVC will always inline that function, that is why the extra "inline" results in a warning. I propose: in llvm/Support/Compiler.h #if __has_attribute(always_inline) || LLVM_GNUC_PREREQ(4, 0, 0) #define LLVM_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) #elif defined(_MSC_VER) #define LLVM_ATTRIBUTE_ALWAYS_INLINE __forceinline #else- #define LLVM_ATTRIBUTE_ALWAYS_INLINE+ #define LLVM_ATTRIBUTE_ALWAYS_INLINE inline #endif and elsewher...
2014 Dec 31
0
[ANNOUNCE] xproto 7.0.27
...ibutes for the clang and Solaris Studio 12.4 compilers, and makes builds on AIX choose the right headers to include. Alan Coopersmith (4): Enable use of __attribute__((deprecated)) with Solaris Studio 12.4 compiler Do not suggest adding new keysyms to XF86keysym.h Use clang's __has_attribute to check for attribute support xproto 7.0.27 Michael Haubenwallner (1): Bug #80528: make it build on AIX git tag: xproto-7.0.27 http://xorg.freedesktop.org/archive/individual/proto/xproto-7.0.27.tar.bz2 MD5: 6c3345111a8044f730984988aacfa567 SHA1: b34e7438623c8016cc8338549e5fcc29e2f6...