[Vm-dev] fdlibm is not C99 conformant

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Dec 29 20:21:29 UTC 2010


Hi,
I suggest using replacements for __HI() and __LO() without illegal
pointer dereferencing.
One stupid possibility is to use an explicit memory copy, like in this
example: (see test_fdlibm.c attachment)

I've tested with:
    gcc -m64 -Wall -02 -D__LITTLE_ENDIAN test_fdlibm.c
    ./a.out
and obtained
    x=-3.14159

Of course, it'll be a bit slower, but we don't care.
More problematic is that we would have to change all the fdlibm sources...

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_fdlibm.c
Type: text/x-csrc
Size: 335 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101229/2e35344e/test_fdlibm.c


More information about the Vm-dev mailing list