ruby-changes:62036
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Mon, 29 Jun 2020 11:08:17 +0900 (JST)
Subject: [ruby-changes:62036] c8dc2bf140 (master): RBIMPL_UNREACHABLE_RETURN: evaluate the argument
https://git.ruby-lang.org/ruby.git/commit/?id=c8dc2bf140 From c8dc2bf1401fc01d35a4a7587ed224f1f2fe29e6 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: Wed, 24 Jun 2020 16:19:55 +0900 Subject: RBIMPL_UNREACHABLE_RETURN: evaluate the argument Prevent casual typos inside of UNREACHABLE_RETURN(...). diff --git a/include/ruby/internal/assume.h b/include/ruby/internal/assume.h index e95b2fb..5af1c3c 100644 --- a/include/ruby/internal/assume.h +++ b/include/ruby/internal/assume.h @@ -42,7 +42,7 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/assume.h#L42 /** Wraps (or simulates) `__builtin_unreachable`. */ #if RBIMPL_HAS_BUILTIN(__builtin_unreachable) -# define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable() +# define RBIMPL_UNREACHABLE_RETURN(_) (__builtin_unreachable(), (_)) #elif defined(RBIMPL_HAVE___ASSUME) # define RBIMPL_UNREACHABLE_RETURN(_) return (__assume(0), (_)) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/