Path: utzoo!attcan!uunet!munnari.oz.au!bruce!trlluna!rhea!aduncan From: aduncan@rhea.trl.oz (Allan Duncan) Newsgroups: comp.sys.amiga.tech Subject: Re: Is this a Lattice C 5.05 compiler bug ? Message-ID: <2402@trlluna.trl.oz> Date: 25 Oct 90 23:12:17 GMT References: <90297.145845ZHHU@MTUS5.BITNET> Sender: news@trlluna.trl.oz Lines: 19 From article <90297.145845ZHHU@MTUS5.BITNET>, by ZHHU@MTUS5.BITNET: > 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 > 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*/ What libraries did you link with? When you use floats in printf, you need to link in the floating point version of printf before lc by using the appropriate lcm first. (See the manual page G15 ff). Allan Duncan ACSnet a.duncan@trl.oz (03) 541 6708 ARPA a.duncan%trl.oz.au@uunet.uu.net UUCP {uunet,hplabs,ukc}!munnari!trl.oz!a.duncan Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.