summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 81f3c691df..a654cddb7e 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -44,6 +44,13 @@ extern "C" {
# define ASSUME(x) ((void)(x))
# endif
#endif
+#ifndef UNREACHABLE_RETURN
+# ifdef UNREACHABLE
+# define UNREACHABLE_RETURN(val) UNREACHABLE
+# else
+# define UNREACHABLE_RETURN(val) return (val)
+# endif
+#endif
#ifndef UNREACHABLE
# define UNREACHABLE ((void)0) /* unreachable */
#endif