diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-12-03 10:48:45 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-12-26 20:45:12 +0900 |
commit | f6dc053faf6a8850c50638b5e06fca9e878de7ae (patch) | |
tree | 2bf0dd2be83471a2d7e690d2e93222511fe2bd5a /internal/compilers.h | |
parent | 68c0dc8d363675881d60b9fde15645d9ee14fafc (diff) | |
download | ruby-f6dc053faf6a8850c50638b5e06fca9e878de7ae.tar.gz |
internal/fixnum.h rework
Add #include lines, move FIXNUM_POSITIVE_P etc. from numeric.h.
Diffstat (limited to 'internal/compilers.h')
-rw-r--r-- | internal/compilers.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/compilers.h b/internal/compilers.h index 8f32030c60..781dd9cfc9 100644 --- a/internal/compilers.h +++ b/internal/compilers.h @@ -85,6 +85,7 @@ # * granular. */ # /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */ # define __has_builtin(...) __has_builtin_##__VA_ARGS__ +# define __has_builtin____builtin_add_overflow GCC_VERSION_SINCE(5, 1, 0) # define __has_builtin____builtin_bswap16 GCC_VERSION_SINCE(4, 8, 0) /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 */ # define __has_builtin____builtin_bswap32 GCC_VERSION_SINCE(3, 6, 0) # define __has_builtin____builtin_bswap64 GCC_VERSION_SINCE(3, 6, 0) @@ -94,12 +95,17 @@ # define __has_builtin____builtin_ctz GCC_VERSION_SINCE(3, 6, 0) # define __has_builtin____builtin_ctzl GCC_VERSION_SINCE(3, 6, 0) # define __has_builtin____builtin_ctzll GCC_VERSION_SINCE(3, 6, 0) -# define __has_builtin____builtin_mul_overflow GCC_VERSION_SINCE(5, 0, 0) +# define __has_builtin____builtin_mul_overflow GCC_VERSION_SINCE(5, 1, 0) # define __has_builtin____builtin_mul_overflow_p GCC_VERSION_SINCE(7, 0, 0) # define __has_builtin____builtin_popcount GCC_VERSION_SINCE(3, 6, 0) # define __has_builtin____builtin_popcountl GCC_VERSION_SINCE(3, 6, 0) # define __has_builtin____builtin_popcountll GCC_VERSION_SINCE(3, 6, 0) +# define __has_builtin____builtin_sub_overflow GCC_VERSION_SINCE(5, 1, 0) # /* Take config.h definition when available */ +# ifdef HAVE_BUILTIN____BUILTIN_ADD_OVERFLOW +# undef __has_builtin____builtin_add_overflow +# define __has_builtin____builtin_add_overflow HAVE_BUILTIN____BUILTIN_ADD_OVERFLOW +# endif # ifdef HAVE_BUILTIN____BUILTIN_BSWAP16 # undef __has_builtin____builtin_bswap16 # define __has_builtin____builtin_bswap16 HAVE_BUILTIN____BUILTIN_BSWAP16 @@ -156,6 +162,10 @@ # undef __has_builtin____builtin_popcountll # define __has_builtin____builtin_popcountll HAVE_BUILTIN____BUILTIN_POPCOUNTLL # endif +# ifdef HAVE_BUILTIN____BUILTIN_SUB_OVERFLOW +# undef __has_builtin____builtin_SUB_overflow +# define __has_builtin____builtin_sub_overflow HAVE_BUILTIN____BUILTIN_SUB_OVERFLOW +# endif #endif #ifndef __has_feature |