Skip to content

Commit

Permalink
Guard GCC-specific macros with _COMPILER_GCC_ (#44353)
Browse files Browse the repository at this point in the history
By default Clang on Linux defines the macro `__GNUC__`, so to guard GCC-specific
code paths it isn't sufficient to check `#ifdef __GNUC__`.
  • Loading branch information
giordano committed Feb 28, 2022
1 parent e84b06c commit bcc0f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
#ifdef _COMPILER_GCC_
#define jl_perm_symsvec(n, ...) \
(jl_perm_symsvec)(__extension__({ \
static_assert( \
Expand Down

0 comments on commit bcc0f70

Please sign in to comment.