[前][次][番号順一覧][スレッド一覧]

ruby-changes:62665

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 21 Aug 2020 11:05:13 +0900 (JST)
Subject: [ruby-changes:62665] 8b022da518 (master): HAVE_STMT_AND_DECL_IN_EXPR: not for Sun C++

https://git.ruby-lang.org/ruby.git/commit/?id=8b022da518

From 8b022da5186a783ade35532e20b1c7b2bd2c591f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Wed, 19 Aug 2020 16:49:50 +0900
Subject: 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.

diff --git a/include/ruby/internal/config.h b/include/ruby/internal/config.h
index 0193275..d51c7df 100644
--- a/include/ruby/internal/config.h
+++ b/include/ruby/internal/config.h
@@ -67,6 +67,14 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/config.h#L67
 # 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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]