From de3e931df7abdc3ee22dbb7543e86af6d00ee899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 24 Jun 2020 16:23:59 +0900 Subject: 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. --- numeric.c | 1 + 1 file changed, 1 insertion(+) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index f0c45fa6ce..b883b30440 100644 --- a/numeric.c +++ b/numeric.c @@ -4013,6 +4013,7 @@ fix_pow_inverted(VALUE x, VALUE minusb) { if (x == INT2FIX(0)) { rb_num_zerodiv(); + UNREACHABLE_RETURN(Qundef); } else { VALUE y = rb_int_pow(x, minusb); -- cgit v1.2.3