[MLton] Re: i386-darwin external _symbols
Wesley W. Terpstra
wesley at terpstra.ca
Fri Sep 5 01:56:24 PDT 2008
On Sun, Aug 31, 2008 at 1:08 AM, Matthew Fluet <fluet at tti-c.org> wrote:
> I've committed your patch plus a few more that gets external functions and
> symbols working on x86-darwin.
Thanks!
The above code works with the native codegen, but not with the C codegen ---
> due to the fact that 'sin' is declared as a function in <math.h> and then
> declared as an untyped extern (defaulting to int; would it be better to
> declare _address symbols as 'extern void'?) in the generated C code.
Making them void makes more sense to me. I just assumed there was a reason
it had no type information. It will still conflict for the 'sin' case,
though. I'm not really sure what the trade-offs are. Probably the only
difference would be if the target had different pointer sizes for different
types (where void must be the largest). So far every MLton target has only
one pointer type, I believe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20080905/e0d4beb7/attachment.html
More information about the MLton
mailing list