summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherman ten brugge <hermantenbrugge@home.nl>2024-02-28 07:37:09 +0100
committerherman ten brugge <hermantenbrugge@home.nl>2024-02-28 07:37:09 +0100
commit2656f8edcce928c2ed74e18baa0b240e93649897 (patch)
tree9178ea619384329b2290bd57e5aa08793c3fcb70
parentf9cb198aa889b011b45f14bb8a79ceba843a1700 (diff)
Fix win64 noreturn problem
On win64 the code would hang in longjump with previous change
-rw-r--r--lib/runmain.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/runmain.c b/lib/runmain.c
index 1cbf6dd..ed089c8 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