I commited a change to lib/runmain.c to silence a warning from gcc.
After that testcase 112 did not work any more on 64 bits windows (tested
with wine).
I can fix this with fix1 (see below) or fix2 (see below).
I do not know enough about windows to make the correct fix.
Both fix1/fix2 look not correct to me.
Herman
fix1:
diff --git a/lib/runmain.c b/lib/runmain.c
index 1cbf6dd..307bf45 100644
--- a/lib/runmain.c
+++ b/lib/runmain.c
@@ -60,6 +60,7 @@ typedef struct rt_frame {
} rt_frame;
void __rt_exit(rt_frame *, int);
+void abort(void);
void exit(int code)
{
@@ -69,7 +70,7 @@ void exit(int code)
f.fp = 0;
f.ip = exit;
__rt_exit(&f, code);
- for (;;); // avoid noreturn warning
+ abort (); // avoid noreturn warning
}
#ifndef _WIN32
fix2:
diff --git a/tccrun.c b/tccrun.c
index b27ccc5..5ea271e 100644
--- a/tccrun.c
+++ b/tccrun.c
@@ -456,7 +456,7 @@ static int protect_pages(void *ptr, unsigned long
length, int mode)
static void *win64_add_function_table(TCCState *s1)
{
void *p = NULL;
- if (s1->uw_pdata) {
+ if (0&&s1->uw_pdata) {
p = (void*)s1->uw_pdata->sh_addr;
RtlAddFunctionTable(
(RUNTIME_FUNCTION*)p,
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel