Reading the FFI spec and information about stdint.h, it looks like this guarantee holds already -- FFI guarantees that Int<n> and Word<n> will be n bits wide and will operate with 2^n arithmetic. It looks like C99 correspondingly defines the same kind of thing for int<n>_t and uint<n>_t. I guess the only missing piece is there is no specification of the byte order, though I would be surprised if they were not both in host byte order.

-Ross

On Feb 10, 2009, at 4:20 PM, Bulat Ziganshin wrote:

Hello ,

<citating letter from cafe>

After reading an ISO draft for standard C, I found
a few types that could be usefull when binding to
libraries (these are from <stdint.h>):

int8_t, uint8_t, int16_t, uint16_t, int32_t,
uint32_t, int64_t, uint64_t

i propose to change FFI addendum so that haskell compilers guarantee
correspondence between Int16 and int16_t types and so on


--
Best regards,
Bulat                          mailto:bulat.zigans...@gmail.com

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to