Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-13 (09:31)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Runtime overflow and what to do
> BTW, i compile the sparc debian package on a sparc64 box which
> advertizes as a sparc box. Will i get access to the 64 bit integers in
> this case or not ?

The short answer is: it depends on the C compiler.  Caml integers
correspond to the C "long int" type, with one bit reserved for GC
purposes.  So, if the C compiler maps "long int" to 64-bit integers,
you get 63-bit Caml ints; if it chooses 32-bit integers for "long int",
you get 31-bit Caml ints.  Often, this can be controlled via flags to
the C compiler.

The above is for the bytecode interpreter.  For the native-code
compiler, the current Sparc code emitter mandates 32-bit integers.

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: