ruby-changes:65833
From: Nobuyoshi <ko1@a...>
Date: Sat, 10 Apr 2021 16:05:14 +0900 (JST)
Subject: [ruby-changes:65833] 3a3033c138 (master): get rid of using `__builtin_unreachable` directly [Bug #17787]
https://git.ruby-lang.org/ruby.git/commit/?id=3a3033c138 From 3a3033c138c0951ad5edbf02b5c233b58a190d2f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 9 Apr 2021 13:52:13 +0900 Subject: get rid of using `__builtin_unreachable` directly [Bug #17787] As it is an independent feature from `clz`, `ctz` and `popcount`, it might be unavailable even if the latters are built in. --- internal/bits.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/bits.h b/internal/bits.h index a7ddcae..746947b 100644 --- a/internal/bits.h +++ b/internal/bits.h @@ -284,7 +284,7 @@ nlz_int64(uint64_t x) https://github.com/ruby/ruby/blob/trunk/internal/bits.h#L284 } else { /* :FIXME: Is there a way to make this branch a compile-time error? */ - __builtin_unreachable(); + UNREACHABLE_RETURN(~0); } #else @@ -419,7 +419,7 @@ rb_popcount64(uint64_t x) https://github.com/ruby/ruby/blob/trunk/internal/bits.h#L419 } else { /* :FIXME: Is there a way to make this branch a compile-time error? */ - __builtin_unreachable(); + UNREACHABLE_RETURN(~0); } #else @@ -492,7 +492,7 @@ ntz_int64(uint64_t x) https://github.com/ruby/ruby/blob/trunk/internal/bits.h#L492 } else { /* :FIXME: Is there a way to make this branch a compile-time error? */ - __builtin_unreachable(); + UNREACHABLE_RETURN(~0); } #else -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/