[PATCH] unify itoa

Denis Vlasenko vda.linux at googlemail.com
Sat Jul 8 19:59:03 UTC 2006


On Saturday 08 July 2006 21:40, Michael S. Zick wrote:
> > It calculates maximum power-of-10 which fits in unsigned int.
> > It does that at compile time, portably. That's why it looks funny.
> > 
> > gcc optimizes it out to simple 1000000000 constant
> > (if sizeof(unsigned)==4, that is).
> 
> Unless you are supporting multiple brands of compilers, it
> optimizes out to a simple constant before you write the code.

The whole world is not a x86[-64].

Please show me the simple constant which is a biggest
power of 10 which fits into variable of type "int" on
platforms with 16-bit, 32-bit, 64-bit and 128-bit ints?
--
vda



More information about the busybox mailing list