summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-19 16:49:50 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-21 11:04:54 +0900
commit8b022da5186a783ade35532e20b1c7b2bd2c591f (patch)
treee8184247c7e101d90a8acea639ac859301808dbf
parent80b316212a337df1ad605e4fae6da47330523d12 (diff)
HAVE_STMT_AND_DECL_IN_EXPR: not for Sun C++
Because we check HAVE_STMT_AND_DECL_IN_EXPR in configure, it is peoven to work in C. But C++ situation can be different. Oracle Developer Studio is another example of such things.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3433
-rw-r--r--include/ruby/internal/config.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ruby/internal/config.h b/include/ruby/internal/config.h
index 0193275e8b7..d51c7df0be7 100644
--- a/include/ruby/internal/config.h
+++ b/include/ruby/internal/config.h
@@ -67,6 +67,14 @@
# undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
#endif
+#if defined(__SUNPRO_CC)
+# /* Oracle Developer Studio 12.5: GCC compatiblity guide says it supports
+# * statement expressions. But to our knowledge they support the extension
+# * only for C and not for C++. Prove me wrong. Am happy to support them if
+# * there is a way. */
+# undef HAVE_STMT_AND_DECL_IN_EXPR
+#endif
+
#ifndef STRINGIZE0
# define STRINGIZE(expr) STRINGIZE0(expr)
# define STRINGIZE0(expr) #expr