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.
This commit is contained in:
Damien George
2019-08-19 15:50:02 +10:00
parent af5c998f37
commit 0c80cb39af
2 changed files with 10 additions and 5 deletions

View File

@@ -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