Skip to content

Commit 105ecd9

Browse files
nobuXrXr
authored andcommitted
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.
1 parent 2f395b7 commit 105ecd9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/bits.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ nlz_int64(uint64_t x)
284284
}
285285
else {
286286
/* :FIXME: Is there a way to make this branch a compile-time error? */
287-
__builtin_unreachable();
287+
UNREACHABLE_RETURN(~0);
288288
}
289289

290290
#else
@@ -419,7 +419,7 @@ rb_popcount64(uint64_t x)
419419
}
420420
else {
421421
/* :FIXME: Is there a way to make this branch a compile-time error? */
422-
__builtin_unreachable();
422+
UNREACHABLE_RETURN(~0);
423423
}
424424

425425
#else
@@ -492,7 +492,7 @@ ntz_int64(uint64_t x)
492492
}
493493
else {
494494
/* :FIXME: Is there a way to make this branch a compile-time error? */
495-
__builtin_unreachable();
495+
UNREACHABLE_RETURN(~0);
496496
}
497497

498498
#else

0 commit comments

Comments
 (0)