aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.in4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a20f8429fa..0bde5494cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 25 14:55:59 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (rb_cv_func___builtin_unreachable): try with an
+ external variable not only by a warning, which might not be
+ shown due to the optimization. [ruby-core:61647] [Bug #9665]
+
Fri Apr 25 13:11:49 2014 NARUSE, Yui <naruse@ruby-lang.org>
* configure.in: NetBSD's ksh, used by configure, needs escapes.
diff --git a/configure.in b/configure.in
index 23dd321df0..45f82674f6 100644
--- a/configure.in
+++ b/configure.in
@@ -1595,8 +1595,8 @@ if test "$GCC" = yes; then
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
[RUBY_WERROR_FLAG(
- [AC_TRY_LINK([@%:@include <stdlib.h>],
- [exit(0); __builtin_unreachable();],
+ [AC_TRY_LINK([volatile int zero;],
+ [if (zero) __builtin_unreachable();],
[rb_cv_func___builtin_unreachable=yes],
[rb_cv_func___builtin_unreachable=no])
])