From 0c80cb39af7a0f6b0ad73d38bf28a8fc1f50b3c7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 19 Aug 2019 15:50:02 +1000 Subject: py: Introduce MP_UNREACHABLE macro to annotate unreachable code. And use it to replace the same pattern at the end of nlrthumb.c:nlr_jump. --- py/nlrthumb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'py/nlrthumb.c') diff --git a/py/nlrthumb.c b/py/nlrthumb.c index eef05229d..bc3038827 100644 --- a/py/nlrthumb.c +++ b/py/nlrthumb.c @@ -135,11 +135,7 @@ NORETURN void nlr_jump(void *val) { : // clobbered registers ); - #if defined(__GNUC__) - __builtin_unreachable(); - #else - for (;;); // needed to silence compiler warning - #endif + MP_UNREACHABLE } #endif // MICROPY_NLR_THUMB -- cgit v1.2.3