[MLton] Re: i386-darwin external _symbols

Matthew Fluet fluet at tti-c.org
Fri Sep 5 14:07:39 PDT 2008


On Fri, 5 Sep 2008, Wesley W. Terpstra wrote:
> On Sun, Aug 31, 2008 at 1:08 AM, Matthew Fluet <fluet at tti-c.org> wrote:
>> 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.

Just because there was no type information from the front-end.  Using 
'void' would seem to communicate lack of definitive information.

> It will still conflict for the 'sin' case, though.

Yeah, gcc (and C standard?) complain bitterly about symbols being 
redeclared with different kinds.



More information about the MLton mailing list