All,

Q: Converting a 32bit unsigned long (when MSB bit is 1) to IEEE
double works correctly GNU CPP under ver. 2.9-psion-98r2
(Symbian build 539) or not?

I'm trying to build the our software for the target Nokia 9210i under Symbian v6.0.
OS Symbian v6.0 uses GNU CPP ver. 2.9-psion-98r2 (Symbian build 539) (ARM/EPOC/PE) in \Symbian\6.0\Shared\EPOC32\gcc\bin.

I could not convert correctly any 32bit unsigned long value
(where MSB bit is 1) to IEEE double under this GNU GCC ver. 2.9-psion-98r2.
Converting positive 32bit unsigned long I got negative IEEE double.

...
// 2702025564 = 0xA10DA35C, where MSB bit is 1.
unsigned long uu = 2702025564;
double d = (double)uu; //BUG: d is negative -1592941732.00
...

So a 32bit unsigned long 2702025564 ( or 0xA10DA35C) is converted to IEEE double -1592941732.00. Why?

Well,
I got assemble for this code:
bl pp__Fv
mov r4, r0
bl __floatsidf
add r6, sp, #32
stmda r6, {r0-r1}

I understand that __floatsidf() has to convert a 32bit signed
integer to IEEE double, but I have a 32bit unsigned long here.
See more explanation about __floatsidf() under Linux, say in
http://www.mit.edu/afs/sipb/project/...fp/floatsidf.c

Could anyone ask me how I can convert a 32bit unsigned long (when MSB bit is 1) to IEEE double correctly under GNU CPP under ver. 2.9-psion-98r2 (Symbian build 539)?

Do I need an other compiler or a patch for this one?

Thanks in advance,
Alex