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?= Date: Thu, 9 Apr 2020 15:55:55 +0900 Subject: [PATCH] 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. --- include/ruby/3/has/builtin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ruby/3/has/builtin.h b/include/ruby/3/has/builtin.h index 23391acc3c..54dc2a5672 100644 --- a/include/ruby/3/has/builtin.h +++ b/include/ruby/3/has/builtin.h @@ -86,6 +86,6 @@ # 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