summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 04:36:09 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 04:36:09 +0000
commit39ee36f63d94c7648a37472f2afa6cce9eb8405b (patch)
tree8201d0d2c0107006910667b575474bca5325aebd /include
parente41b4a45a4372167adf4717e7d5e87e29b352227 (diff)
disable __builtin_alloca_with_align for GCC 4.8
It seems to be a false positive that the configure detects this undocumented function to be available on the compiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index df98c0daa8..7006beab1b 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1595,6 +1595,14 @@ rb_num2char_inline(VALUE x)
#define ZALLOC(type) RB_ZALLOC(type)
#define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
+#if GCC_VERSION_BEFORE(4,8,6)
+/* GCC 4.8.5 reportedly has this feature and is broken.
+ * The function is not officially documented below.
+ * Seems we should not use it.
+ * https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Other-Builtins.html#Other-Builtins */
+# undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
+#endif
+
#ifdef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
/* I don't know why but __builtin_alloca_with_align's second argument
takes bits rather than bytes. */