Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!snorkelwacker!bloom-beacon!eru!hagbard!sunic!dkuug!rcbal!poe From: poe@kos.rci.dk (Poul Oestergaard) Newsgroups: comp.sys.mips Subject: Type conversion error in cc Keywords: cc, type-conversion Message-ID: <1043@kos.rci.dk> Date: 11 Oct 90 12:15:17 GMT Distribution: comp Organization: RC International, Copenhagen, Denmark Lines: 35 The following program: main() { unsigned long l1, l2; double d; l1 = 4000000000L; d = l1; l2 = d; printf("l1 = %lu\nd = %14.0f\nl2 = %lu\n", l1, d, l2); } produces: l1 = 4000000000 d = 4000000000 l2 = 2147483647 when compiled with MIPS cc and executed. l2 should be equal to l1 and d. The error is in version 1.31, 2.0, and 2.10 of the MIPS cc compiler. Does anyone have a MIPS compiler source level fix to this problem, since it is causing us some problems? The error has been accepted by MIPS, but not corrected yet. Regards Poul Oestergaard RC International Denmark Mail: poe@rci.dk