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
[Caml-list] Bug? Printf, %X and negative numbers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-31 (17:13)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Bug? Printf, %X and negative numbers
> need to do a signed or unsigned int conversion.  Or, I suppose, we 
> could
> completely redesign Ocaml to use 32-bit ints and do something else to
> differentiate ints from pointers :-).

That would only require a redesign of part of the runtime.  As far as I 
can tell, at least for native code, it should only affect the 
representation of mixed data, garbage collection and use in polymorphic 
functions, none of which would necessarily be that bad for performance 
if designed and optimized properly.

On the other hand, the efficiency of the current implementation 
probably has a lot to do with good choices of compromises in allocating 
the bits of block headers...

I wonder how much work it would be to test how efficiently such a 
change could be done without going all the way...has anyone looked into 

> More pragmatically, I think this behavior should just be documented.
> "Broken as designed".  Once you know about it, it's annoying not 
> critical.

And maybe %u should be disabled altogether if it can never produce any 
correct results that differ from %d.

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