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
This commit is contained in:
nobu 2014-04-25 05:56:01 +00:00
Родитель b4682ea330
Коммит e4cde46942
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -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])
])