summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2021-04-29 17:53:07 +0900
committernagachika <nagachika@ruby-lang.org>2021-04-29 17:53:07 +0900
commit3e07a4edc92f18dec4806961c1b724ac5cf4d6b2 (patch)
treefb9c5ddfa9864de73f6e763ce28d18c6e002764a /internal
parentcc4e602634e894c831a4103a5803a3de566c1856 (diff)
merge revision(s) 3a3033c138c0951ad5edbf02b5c233b58a190d2f: [Backport #17787]
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(-)
Diffstat (limited to 'internal')
-rw-r--r--internal/bits.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/bits.h b/internal/bits.h
index a7ddcaeb78..746947bfc2 100644
--- a/internal/bits.h
+++ b/internal/bits.h
@@ -284,7 +284,7 @@ nlz_int64(uint64_t x)
}
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)
}
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)
}
else {
/* :FIXME: Is there a way to make this branch a compile-time error? */
- __builtin_unreachable();
+ UNREACHABLE_RETURN(~0);
}
#else