summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-24 16:23:59 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:05:41 +0900
commitde3e931df7abdc3ee22dbb7543e86af6d00ee899 (patch)
tree63f8471b59282d2ca5e7af0282f34d9cfef14ee1 /thread.c
parentc8dc2bf1401fc01d35a4a7587ed224f1f2fe29e6 (diff)
add UNREACHABLE_RETURN
Not every compilers understand that rb_raise does not return. When a function does not end with a return statement, such compilers can issue warnings. We would better tell them about reachabilities.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3247
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 3337735..e463b72 100644
--- a/thread.c
+++ b/thread.c
@@ -5175,6 +5175,7 @@ exec_recursive(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE pairid, VALUE
rb_raise(rb_eTypeError, "invalid inspect_tbl pair_list "
"for %+"PRIsVALUE" in %+"PRIsVALUE,
sym, rb_thread_current());
+ UNREACHABLE_RETURN(Qundef);
}
/*