Repository: JuliaLang/julia
File: src/support/dtypes.h (C/C++)

Code before:
#define FORCE_INLINE static inline __attribute__((always_inline))

#define EXTERN_INLINE_DECLARE inline __attribute__ ((visibility("default")))
#define EXTERN_INLINE_DEFINE extern inline JL_DLLEXPORT

#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
#  define NOINLINE __declspec(noinline)
#  define NOINLINE_DECL(f) __declspec(noinline) f
#else
#  define NOINLINE __attribute__((noinline))
#  define NOINLINE_DECL(f) f __attribute__((noinline))
#endif

#ifdef _COMPILER_MICROSOFT_
# ifdef _P64
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(8)) x
# else
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(4)) x
# endif
#elif defined(__GNUC__)
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) x __attribute__ ((aligned (sizeof(void*))))
#else
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x)
#endif

#if defined __has_builtin
#  define jl_has_builtin(x) __has_builtin(x)
#else
#  define jl_has_builtin(x) 0
#endif

#ifdef JL_NDEBUG
#  if jl_has_builtin(__builtin_assume)
#    define jl_assume(cond)                     \
       (__extension__({                         \
           __typeof__(cond) cond_ = (cond);     \
           __builtin_assume(!!(cond_));         \
           cond_;                               \
       }))
#  elif defined(__GNUC__)
static inline void jl_assume_(int cond)
{
    if (!cond) {
        __builtin_unreachable();
    }
}
#    define jl_assume(cond)                     \
       (__extension__({                         \
           __typeof__(cond) cond_ = (cond);     \
           jl_assume_(!!(cond_));               \
           cond_;                               \

Review comment (suggestion):
```suggestion
#if defined(__has_builtin)
```

just a tiny style nit, since we (mostly) use this form

Code after:
#define FORCE_INLINE static inline __attribute__((always_inline))

#define EXTERN_INLINE_DECLARE inline __attribute__ ((visibility("default")))
#define EXTERN_INLINE_DEFINE extern inline JL_DLLEXPORT

#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
#  define NOINLINE __declspec(noinline)
#  define NOINLINE_DECL(f) __declspec(noinline) f
#else
#  define NOINLINE __attribute__((noinline))
#  define NOINLINE_DECL(f) f __attribute__((noinline))
#endif

#ifdef _COMPILER_MICROSOFT_
# ifdef _P64
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(8)) x
# else
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(4)) x
# endif
#elif defined(__GNUC__)
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) x __attribute__ ((aligned (sizeof(void*))))
#else
#  define JL_ATTRIBUTE_ALIGN_PTRSIZE(x)
#endif

#if defined(__has_builtin)
#  define jl_has_builtin(x) __has_builtin(x)
#else
#  define jl_has_builtin(x) 0
#endif

#ifdef JL_NDEBUG
#  if jl_has_builtin(__builtin_assume)
#    define jl_assume(cond)                     \
       (__extension__({                         \
           __typeof__(cond) cond_ = (cond);     \
           __builtin_assume(!!(cond_));         \
           cond_;                               \
       }))
#  elif defined(__GNUC__)
static inline void jl_assume_(int cond)
{
    if (!cond) {
        __builtin_unreachable();
    }
}
#    define jl_assume(cond)                     \
       (__extension__({                         \
           __typeof__(cond) cond_ = (cond);     \
           jl_assume_(!!(cond_));               \
           cond_;                               \