west@calgary.UUCP (03/16/87)
We have Lattice 3.1 and have applied the two fixes to the compiler and libraries. A simple statement such as printf("%f\n",4.0/2.0); does not give the expected results when compiled "lc -f -Lf blah", but does when compiled "lc -Lm blah". The problem certainly appears to be a bug in the constant expression evaluation section of the compiler, (it does not realize it is working with motorola ffp format?) since when an intermediate assignment is done, and the compiler is forced to generate actual multiply or divide function calls, the correct output is generated. eg. printf("%f\n",4.0/(x=2.0));/* where x is "float" or "double" */ It is possible to work around this bug, but makes for interesting debugging when using #define's. Is there a new fix to the compiler? -- Darrin West, Master's Unit (read: student). ..![ubc-vision,ihnp4]! Department of Computer Science alberta!calgary!west University of Calgary. Can you say '88 Winter Games? Brain fault (cortex dumped)