Re: Type promotion in ccall arguments

2002-03-22 Thread Fergus Henderson
On 14-Mar-2002, Simon Marlow <[EMAIL PROTECTED]> wrote: > I can't remember whether this has come up before, but to my surprise > I've just discovered that FFI foreign import declarations don't contain > enough infomration to be able to determine the correct calling > convention for a given C funct

Re: Type promotion in ccall arguments

2002-03-15 Thread S. Doaitse Swierstra
At 13:47 + 14-03-2002, Julian Seward wrote: > > >How absolutely horrible. Why do the C people have such a >bizarre set of rules? How about "our" off-side rule? Doaitse -- __ S. Doaitse Swierstra, Department of Compu

RE: Type promotion in ccall arguments

2002-03-14 Thread Simon Peyton-Jones
| > I'd say it has all the information you need - you were | using it wrong. | | That's fine - but I think the FFI specification should state | somewhere that the signature for a foreign import ccall | should correspond to the type of the C call *after the C | promotion rules have been applie

RE: Type promotion in ccall arguments

2002-03-14 Thread Simon Marlow
> > I can't remember whether this has come up before, but to my surprise > > I've just discovered that FFI foreign import declarations don't > > contain enough infomration to be able to determine the correct > > calling convention for a given C function. > > I'd say it has all the information you

Re: Type promotion in ccall arguments

2002-03-14 Thread Alastair David Reid
> I can't remember whether this has come up before, but to my surprise > I've just discovered that FFI foreign import declarations don't > contain enough infomration to be able to determine the correct > calling convention for a given C function. I'd say it has all the information you need - you

Re: Type promotion in ccall arguments

2002-03-14 Thread Julian Seward
> the native code generator was passing the Float as a C float on the > stack, but snprintf() expects a double. Half-remembering that C > specifies that floats should be promoted to doubles in function call > arguemts, I modified the NCG to do just this. But the C standard > doesn't say this -