Commit 782b5bf7 authored by Simon Marlow's avatar Simon Marlow

Fix capi_value on Windows

This appears to be a bug in the gcc that we're currently using.

Compiling this, with -O:

const int i;
int f(void) {return i;}

results in this assembly:

        pushl   %ebp
        movl    %esp, %ebp
        movl    $0, %eax   <--- the $0 is wrong, should be _i

Turning off -O makes it work.

Maybe time to update our mingw gcc bundles?
parent 8e6b9021
#include "capi_value_c.h"
const int i = 23;
int i = 23;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment