1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

RBIMPL_UNREACHABLE_RETURN: evaluate the argument

Prevent casual typos inside of UNREACHABLE_RETURN(...).
This commit is contained in:
卜部昌平 2020-06-24 16:19:55 +09:00
parent bacd03ebdf
commit c8dc2bf140
Notes: git 2020-06-29 11:06:33 +09:00

View file

@ -42,7 +42,7 @@
/** 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), (_))