diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 14:54:49 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 14:54:49 +0000 |
commit | 60eeeb70df15cc77724b454d40e02d040da8f1f1 (patch) | |
tree | fe171fc497798813ab9b72503058e127967b48f3 /configure.in | |
parent | b6fe6d591c53fc4b31eeafa4edae76cff5940d3e (diff) |
merge revision(s) r45716: [Backport #9665]
* 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/branches/ruby_2_1@46215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 1a001e6253..bf337f09ce 100644 --- a/configure.in +++ b/configure.in @@ -1548,8 +1548,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]) ]) |