diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-25 05:56:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-25 05:56:01 +0000 |
commit | e4cde46942a8ea64444a503e1ded944e41ded231 (patch) | |
tree | a9aa9bdbe516502cd6e3048edfd822ba34faa47a | |
parent | b4682ea330e0aeaf3c26c3f39eb9685155d983f0 (diff) | |
download | ruby-e4cde46942a8ea64444a503e1ded944e41ded231.tar.gz |
configure.in: refine __builtin_unreachable check
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.in | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -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]) ]) |