summaryrefslogtreecommitdiff
path: root/include/ruby/internal
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-11-12 16:09:40 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2024-11-12 16:40:52 +0900
commitf17cfb49580b400aec307710e2d27788c493cb72 (patch)
tree5dddd00e57e494f11690b54fc4d75892c86380ae /include/ruby/internal
parent8409edc4971f34cf0d77c375909c5b8f7b1e058a (diff)
Add missing macros for `__has_builtin`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12060
Diffstat (limited to 'include/ruby/internal')
-rw-r--r--include/ruby/internal/has/builtin.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ruby/internal/has/builtin.h b/include/ruby/internal/has/builtin.h
index 243ba2a34c..8e7fb173d8 100644
--- a/include/ruby/internal/has/builtin.h
+++ b/include/ruby/internal/has/builtin.h
@@ -48,6 +48,7 @@
# /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */
# define RBIMPL_HAS_BUILTIN(_) (RBIMPL_HAS_BUILTIN_ ## _)
# define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0)
# define RBIMPL_HAS_BUILTIN___builtin_assume 0
@@ -75,6 +76,7 @@
# define RBIMPL_HAS_BUILTIN___builtin_rotateright32 0
# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
# /* Note that "0, 0, 0" might be inaccurate. */
@@ -82,6 +84,7 @@
# /* Take config.h definition when available */
# define RBIMPL_HAS_BUILTIN(_) ((RBIMPL_HAS_BUILTIN_ ## _)+0)
# define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow_p HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW_P
# define RBIMPL_HAS_BUILTIN___builtin_alloca 0
# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
# define RBIMPL_HAS_BUILTIN___builtin_assume 0
@@ -107,6 +110,7 @@
# define RBIMPL_HAS_BUILTIN___builtin_rotateright64 0
# define RBIMPL_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL
# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow_p HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW_P
# if defined(HAVE___BUILTIN_UNREACHABLE)
# define RBIMPL_HAS_BUILTIN___builtin_unreachable 1
# else
d> 2012-11-01proc.c: main.define_methodnobu 2012-10-28* bignum.c (bignew_1): Bignum instances are frozen.ko1 2012-08-08vm_eval.c: cref-scope hacknobu 2012-08-08use local variablesnobu 2012-08-06method in instance_evalnobu 2012-07-19test_eval.rb: adjust indentnobu 2012-07-19test_eval.rb: use blocknobu 2010-09-23* vm_insnhelper.c (vm_cref_push): no outer cref is needed for procnobu 2009-08-17* parse.y (lex_get_str, lex_io_gets, rb_parser_compile_string):nobu 2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu 2008-12-25* test/ruby/test_eval.rb: add new test.usa