ruby-changes:61299
From: Koichi <ko1@a...>
Date: Wed, 20 May 2020 10:29:54 +0900 (JST)
Subject: [ruby-changes:61299] 67d259c5dc (master): Use __bultin_assume() from clang-7
https://git.ruby-lang.org/ruby.git/commit/?id=67d259c5dc From 67d259c5dccd31fe49d417fec169977712ffdf10 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 20 May 2020 02:37:58 +0900 Subject: Use __bultin_assume() from clang-7 We observed combination of multiple __builtin_assume() can cause strange compile results on clang-6 (-DNDEBUG exposed this issue). To avoid this problem, __builtin_assume() is from clang-7. https://github.com/ruby/ruby/pull/3120#issuecomment-630821333 diff --git a/include/ruby/assert.h b/include/ruby/assert.h index ac9b9c8..a79abea 100644 --- a/include/ruby/assert.h +++ b/include/ruby/assert.h @@ -90,7 +90,7 @@ RBIMPL_SYMBOL_EXPORT_END() https://github.com/ruby/ruby/blob/trunk/include/ruby/assert.h#L90 # define RBIMPL_ASSERT_OR_ASSUME(_) RUBY_ASSERT(_) #elif defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_) -#elif RBIMPL_HAS_BUILTIN(__builtin_assume) +#elif RBIMPL_HAS_BUILTIN(__builtin_assume) && RBIMPL_COMPILER_SINCE(Clang, 7, 0, 0) # define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_) #else # define RBIMPL_ASSERT_OR_ASSUME(_) /* void */ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/