[前][次][番号順一覧][スレッド一覧]

ruby-changes:66017

From: nagachika <ko1@a...>
Date: Thu, 29 Apr 2021 17:53:34 +0900 (JST)
Subject: [ruby-changes:66017] 3e07a4edc9 (ruby_3_0): merge revision(s) 3a3033c138c0951ad5edbf02b5c233b58a190d2f: [Backport #17787]

https://git.ruby-lang.org/ruby.git/commit/?id=3e07a4edc9

From 3e07a4edc92f18dec4806961c1b724ac5cf4d6b2 Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Thu, 29 Apr 2021 17:53:07 +0900
Subject: 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(-)
---
 internal/bits.h | 6 +++---
 version.h       | 2 +-
 2 files changed, 4 insertions(+), 4 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
diff --git a/version.h b/version.h
index 9a0663c..127db88 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 2
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 74
+#define RUBY_PATCHLEVEL 75
 
 #define RUBY_RELEASE_YEAR 2021
 #define RUBY_RELEASE_MONTH 4
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]