From 8f98c16a384f0c8543e4d22de3f4b028f8e6695d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sat, 26 Feb 2022 02:27:51 +0000 Subject: [PATCH] Guard GCC-specific macros with `!defined(__clang__)` By default Clang on Linux defines the macro `__GNUC__`, so to guard GCC-specific code paths it isn't sufficient to check `#ifdef __GNUC__`. Co-authored-by: Jameson Nash --- src/julia_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julia_internal.h b/src/julia_internal.h index e55854121393b..5df813e73c532 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -422,7 +422,7 @@ jl_svec_t *jl_perm_symsvec(size_t n, ...); // this sizeof(__VA_ARGS__) trick can't be computed until C11, but that only matters to Clang in some situations #if !defined(__clang_analyzer__) && !(defined(_COMPILER_ASAN_ENABLED_) || defined(_COMPILER_TSAN_ENABLED_)) -#ifdef __GNUC__ +#if _COMPILER_GCC_ #define jl_perm_symsvec(n, ...) \ (jl_perm_symsvec)(__extension__({ \ static_assert( \