From d2e2b309e82f9f0f68f62952673233331465917f Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 Apr 2012 03:55:06 +0000 Subject: [PATCH] * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code if -O3 is given. * win32/win32.c (child_result): dropped colon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ configure.in | 2 ++ win32/win32.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fd8829eb36..9bbdc62e75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Apr 14 12:55:03 2012 Nobuyoshi Nakada + + * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code + if -O3 is given. + + * win32/win32.c (child_result): dropped colon. + Sat Apr 14 10:45:18 2012 NARUSE, Yui * lib/webrick/server.rb (WEBrick::GenericServer#start): diff --git a/configure.in b/configure.in index 9b44842666..e7cb7455a0 100644 --- a/configure.in +++ b/configure.in @@ -912,11 +912,13 @@ if test "$GCC" = yes; then fi AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable, + [RUBY_WERROR_FLAG( [AC_TRY_LINK([@%:@include ], [exit(0); __builtin_unreachable();], [rb_cv_func___builtin_unreachable=yes], [rb_cv_func___builtin_unreachable=no]) ]) + ]) if test "$rb_cv_func___builtin_unreachable" = yes; then AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()]) fi diff --git a/win32/win32.c b/win32/win32.c index 782cb61773..5437cb6c38 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1079,7 +1079,7 @@ child_result(struct ChildRecord *child, int mode) GetExitCodeProcess(child->hProcess, &exitcode); CloseChildHandle(child); _exit(exitcode); - default + default: UNREACHABLE; } }