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:
parent
bacd03ebdf
commit
c8dc2bf140
Notes:
git
2020-06-29 11:06:33 +09:00
1 changed files with 1 additions and 1 deletions
|
@ -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), (_))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue