summaryrefslogtreecommitdiffstatshomepage
path: root/py/nlrthumb.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-08-19 15:50:02 +1000
committerDamien George <damien.p.george@gmail.com>2019-08-19 16:14:33 +1000
commit0c80cb39af7a0f6b0ad73d38bf28a8fc1f50b3c7 (patch)
tree6bd823c1b3e6471cb49fc4124978909169f6d31d /py/nlrthumb.c
parentaf5c998f37ddc62abfd36e0b8be511c392fc25d8 (diff)
downloadmicropython-0c80cb39af7a0f6b0ad73d38bf28a8fc1f50b3c7.tar.gz
micropython-0c80cb39af7a0f6b0ad73d38bf28a8fc1f50b3c7.zip
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.
Diffstat (limited to 'py/nlrthumb.c')
-rw-r--r--py/nlrthumb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/py/nlrthumb.c b/py/nlrthumb.c
index eef05229d6..bc30388278 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