[MLton] Re: C-types
Wesley W. Terpstra
wesley@terpstra.ca
Sun, 14 May 2006 13:45:20 +0200
On May 14, 2006, at 4:56 AM, Matthew Fluet wrote:
>> On May 13, 2006, at 5:57 PM, Matthew Fluet wrote:
>>> Suggestions on how to pass rlim_t up to ML user code in a
>>> portable manner?
>> What happens if the FFI lies and uses the wrong signedness?
>
> We can be burned by calling conventions that sign-extend signed
> values but zero-extend unsigned values. This came up with PowerPC
> in the past.
But you've ensured that the size is correct now, right? So sign-
extension will never be needed. I'm not really advocating this,
though; I think an explicit sign conversion in SML would be ok..?