[Hugs-bugs] cast from pointer to integer losing bits

fool at sdf-eu.org fool at sdf-eu.org
Sat Oct 23 09:52:22 EDT 2004


$ make
cd src; make all
make[1]: Entering directory `/udd/f/fool/hugs98-20041022/src'
gcc -c -DNDEBUG=1 -g  -O2 hugs.c
gcc -c -DNDEBUG=1 -g  -O2 edit.c
gcc -c -DNDEBUG=1 -g  -O2 observe.c
gcc -c -DNDEBUG=1 -g  -O2 builtin.c
builtin.c: In function `primPtrToInt':
builtin.c:1268: warning: cast from pointer to integer of different size
In file included from builtin.c:1409:
iomonad.c: In function `primCastSPToP':
iomonad.c:1903: warning: cast to pointer from integer of different size
iomonad.c: In function `primCastPToSP':
iomonad.c:1909: warning: cast from pointer to integer of different size
builtin.c: In function `putStablePtr4':
builtin.c:1772: warning: cast from pointer to integer of different size
builtin.c: In function `getStablePtr4':
builtin.c:1777: warning: cast to pointer from integer of different size
builtin.c: In function `freeStablePtr4':
builtin.c:1781: warning: cast from pointer to integer of different size

I don't know if this causes trouble, but it looks like a bad omen.
On the system here (NetBSD/alpha 1.6.2, gcc 2.95.3 or 3.3.4)
I have sizeof(int)==4, sizeof(void*)==8.


More information about the Hugs-Bugs mailing list