Path: utzoo!utgpu!watmath!watcgl!andrewt From: andrewt@watsnew.waterloo.edu (Andrew Thomas) Newsgroups: gnu.gcc.bug Subject: gcc-1.35 - constant floating point bug Message-ID: Date: 6 Jun 89 23:16:46 GMT Sender: daemon@watcgl.waterloo.edu Distribution: world Organization: University of Waterloo, Waterloo, Ontario, Canada Lines: 29 I am running a uVax II with Ultrix 2.0, gcc-1.35. I have seen reports for this bug before, and I am wondering if there is a simple fix. The following program generates the error noted below it: ----------------------- main() { float x; x=1; printf ("%g\n",x); } gccbug.c:4: Magnitude of constant too large for 'float' -------------------------------- The same behaviour occurs if line 4 is changed to x=1.0. This can be circumvented if I say: int y = 1; x = y; But what happens when I want x=1.5 ? -- Andrew Thomas andrewt@watsnew.waterloo.edu Systems Design Eng. University of Waterloo