Article View: comp.sys.amiga.tech
Article #6055Is this a Lattice C 5.05 compiler bug ?
From: ZHHU
Date: Wed, 24 Oct 1990 19:58
Date: Wed, 24 Oct 1990 19:58
25 lines
1179 bytes
1179 bytes
Whenever an unsigned integer multiply a float or a double, it will
crash my Amiga 1000, but the same source code works fine on a PC or
UNIX machine. This is painful, because you can be careful by type
casting, but when you compile a PD program, especially the big files
you cannot afford the time to find them. I use Lattice C compiler 5.05,
I wonder if this is a bug, whether 5.10 have the same problem. Can
any body kindly take the risk of crashing, and try the following:
#include <stdio.h>
main()
{
unsigned int i;
int j;
float a;
i = 10;
j = 10;
a = j*15.0; /* should not crash here */
printf("a= %f:n",a);
a = i*15.0; /* crash here on my machine*/
printf("a= %f:n",a);
}
/* end of the program */
Zhiquan
Technical Details
Message-ID:
<90297.145845ZHHU@MTUS5.BITNET>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!psuvm!cunyvm!ndsuvm1!mtus5!zhhuShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!psuvm!cunyvm!ndsuvm1!mtus5!zhhu From: ZHHU@MTUS5.BITNET Newsgroups: comp.sys.amiga.tech Subject: Is this a Lattice C 5.05 compiler bug ? Message-ID: <90297.145845ZHHU@MTUS5.BITNET> Date: 24 Oct 90 19:58:45 GMT Organization: Computing Technology Services, Michigan Technological Univ. Lines: 25