From 2656f8edcce928c2ed74e18baa0b240e93649897 Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Wed, 28 Feb 2024 07:37:09 +0100 Subject: [PATCH] Fix win64 noreturn problem On win64 the code would hang in longjump with previous change --- lib/runmain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/runmain.c b/lib/runmain.c index 1cbf6dda..ed089c87 100644 --- a/lib/runmain.c +++ b/lib/runmain.c @@ -59,7 +59,7 @@ typedef struct rt_frame { void *ip, *fp, *sp; } rt_frame; -void __rt_exit(rt_frame *, int); +__attribute__((noreturn)) void __rt_exit(rt_frame *, int); void exit(int code) { @@ -69,7 +69,6 @@ void exit(int code) f.fp = 0; f.ip = exit; __rt_exit(&f, code); - for (;;); // avoid noreturn warning } #ifndef _WIN32