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

ruby-changes:60721

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 10 Apr 2020 16:17:46 +0900 (JST)
Subject: [ruby-changes:60721] 133ae0807d (master): RUBY3_HAS_BUILTIN: fix __builtin_unreachable

https://git.ruby-lang.org/ruby.git/commit/?id=133ae0807d

From 133ae0807d661eac174b59c6e91c11a40975baea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Thu, 9 Apr 2020 15:55:55 +0900
Subject: RUBY3_HAS_BUILTIN: fix __builtin_unreachable

This macro has to be truthy, otherwise the `+0` trick above evalues
RUBY3_HAS_BUILTIN(__builtin_unreachable) to be always false.

diff --git a/include/ruby/3/has/builtin.h b/include/ruby/3/has/builtin.h
index 23391ac..54dc2a5 100644
--- a/include/ruby/3/has/builtin.h
+++ b/include/ruby/3/has/builtin.h
@@ -86,6 +86,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/has/builtin.h#L86
 # define RUBY3_HAS_BUILTIN___builtin_popcountll        HAVE_BUILTIN___BUILTIN_POPCOUNTLL
 # define RUBY3_HAS_BUILTIN___builtin_sub_overflow      HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
 # if defined(UNREACHABLE)
-#  define RUBY3_HAS_BUILTIN___builtin_unreachable
+#  define RUBY3_HAS_BUILTIN___builtin_unreachable 1
 # endif
 #endif
-- 
cgit v0.10.2


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

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