🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6148

Re: Is this a Lattice C 5.05 compiler bug ?

#6148
From: Frank Pecher
Date: Sat, 27 Oct 1990 01:07
33 lines
1617 bytes
In article <90297.145845ZHHU@MTUS5.BITNET> ZHHU@MTUS5.BITNET writes:
>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);
>}

I own an Amiga 2000 and Lattice C5.05; the program works fine when
compiled with

    lc -f -Lm prog

        --  Frank

--
Frank Pecher, Schwalbenweg 26, 7030 Boeblingen root@bcstarc.stgt.sub.org
>>              This line was intentionally left blank                <<
Technical Details
Message-ID: <52@bcstarc.stgt.sub.org>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!nadia!bcstarc!root
References: <90297.145845ZHHU@MTUS5.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!nadia!bcstarc!root
From: root@bcstarc.stgt.sub.org (Frank Pecher)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Is this a Lattice C 5.05 compiler bug ?
Message-ID: <52@bcstarc.stgt.sub.org>
Date: 27 Oct 90 01:07:37 GMT
References: <90297.145845ZHHU@MTUS5.BITNET>
Reply-To: fpe@bcstarc.stgt.sub.org (Frank Pecher)
Organization: Boeblingen ComputerScienTific ARChive
Lines: 33