Sun C bug [from info-gcc]
Tom Perrine x426
tots!eltoro!tep%suntan.West at sun.com
Tue May 16 07:42:42 AEST 1989
I noticed this in gnu.gcc.bug, and thought people would be interested.
From: !mcgrath at tully.Berkeley.EDU (Roland McGrath)
Newsgroups: gnu.gcc.bug
Subject: gcc 1.35 fixunsdfsi doesn't work on Sun 3 (68020)
Date: 14 May 89 11:49:54 GMT
There is a bug in the Sun 3 C compiler such that under -O,
the `__fixunsdfsi' function in gnulib gets done wrong.
Without -O, it compiles to:
link a6, #0
movel a6@(8), d0
movel a6@(12), d1
jsr Fund
unlk a6
rts
With -O, it becomes:
link a6, #0
jsr Fund
unlk a6
rts
which doesn't work.
The bottom line is that unless you compile gnulib without -O, casting a
double to an unsigned int won't work (it will always come out zero).
More information about the Comp.sys.sun
mailing list