diff options
author | Tomasz Konojacki <me@xenu.pl> | 2020-04-06 13:04:05 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-04-06 07:06:30 -0600 |
commit | bfde97e001cac6d787c92149426f99821a4c69f0 (patch) | |
tree | 89f076e250bac70fffa7e3f7a41635a75b898536 | |
parent | d711360400f0d6e611cc4aa81fb0cfadfa5312e4 (diff) | |
download | perl-bfde97e001cac6d787c92149426f99821a4c69f0.tar.gz |
don't disable __attribute__((always_inline)) on clang
clang pretends to be gcc 4.2
-rw-r--r-- | perl.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -294,6 +294,11 @@ : (REGEXP *)NULL) #endif +/* some compilers impersonate gcc */ +#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) +# define PERL_IS_GCC 1 +#endif + /* In case Configure was not used (we are using a "canned config" * such as Win32, or a cross-compilation setup, for example) try going * by the gcc major and minor versions. One useful URL is @@ -373,7 +378,7 @@ #endif #ifdef HASATTRIBUTE_ALWAYS_INLINE /* always_inline is buggy in gcc <= 4.6 and causes compilation errors */ -# if __GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4 +# if !defined(PERL_IS_GCC) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4) # define __attribute__always_inline__ __attribute__((always_inline)) # endif #endif |