aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-07 13:35:32 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-07 13:35:32 +0000
commit570a6c42717cde056afee90614be8a57f84488fd (patch)
treebe587a8552cfc32c97b37154cc18d0d48f1d8611 /include
parent8c4ab4996901013aa41e8a169fb0c0fa98cca3c4 (diff)
downloadruby-570a6c42717cde056afee90614be8a57f84488fd.tar.gz
* ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++. [ruby-core:72736] [Bug #11962] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 7aabf5bd68..82dca14682 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -26,6 +26,13 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
+#if defined(__cplusplus)
+/* __builtin_choose_expr and __builtin_types_compatible aren't available
+ * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
+# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P
+#endif
+
#include "defines.h"
#define NORETURN_STYLE_NEW 1