55ecc21
From 98e565ec78cb4a07ffde8589ac4581fca31e9c17 Mon Sep 17 00:00:00 2001
55ecc21
From: mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
55ecc21
Date: Thu, 7 Jan 2016 13:35:32 +0000
55ecc21
Subject: [PATCH] * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
55ecc21
   and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++.   [ruby-core:72736]
55ecc21
 [Bug #11962]
55ecc21
55ecc21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
55ecc21
---
55ecc21
 ChangeLog           | 6 ++++++
55ecc21
 include/ruby/ruby.h | 7 +++++++
55ecc21
 2 files changed, 13 insertions(+)
55ecc21
55ecc21
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
55ecc21
index 7aabf5b..82dca14 100644
55ecc21
--- a/include/ruby/ruby.h
55ecc21
+++ b/include/ruby/ruby.h
55ecc21
@@ -26,6 +26,13 @@ extern "C" {
55ecc21
 #include RUBY_EXTCONF_H
55ecc21
 #endif
55ecc21
 
55ecc21
+#if defined(__cplusplus)
55ecc21
+/* __builtin_choose_expr and __builtin_types_compatible aren't available
55ecc21
+ * on C++.  See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
55ecc21
+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
55ecc21
+# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P
55ecc21
+#endif
55ecc21
+
55ecc21
 #include "defines.h"
55ecc21
 
55ecc21
 #define NORETURN_STYLE_NEW 1