Skip to content

Commit c614665

Browse files
giordanoLilithHafner
authored andcommitted
Guard GCC-specific macros with _COMPILER_GCC_ (JuliaLang#44353)
By default Clang on Linux defines the macro `__GNUC__`, so to guard GCC-specific code paths it isn't sufficient to check `#ifdef __GNUC__`.
1 parent 33bf0ee commit c614665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/julia_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ jl_svec_t *jl_perm_symsvec(size_t n, ...);
422422

423423
// this sizeof(__VA_ARGS__) trick can't be computed until C11, but that only matters to Clang in some situations
424424
#if !defined(__clang_analyzer__) && !(defined(_COMPILER_ASAN_ENABLED_) || defined(_COMPILER_TSAN_ENABLED_))
425-
#ifdef __GNUC__
425+
#ifdef _COMPILER_GCC_
426426
#define jl_perm_symsvec(n, ...) \
427427
(jl_perm_symsvec)(__extension__({ \
428428
static_assert( \

0 commit comments

Comments
 (0)