aryeh@eddie.mit.edu (Aryeh M. Weiss) (04/07/90)
The bug I posted about the SCO MSC 5.1 ANSI C compiler is known to SCO. The bug is in the handling of float parameters in ANSI prototypes in procedure headings: x (float y, float z) { float w = y + z; } main () { x (1.0, 1.0); } The ANSI standard says that float parameters do NOT get expanded to doubles when passed to procedures. Procedure `x' takes float arguments off the stack as 4-byte single precision entities, but the call in `main' pushes doubles on the stack. As a result `x' gets hopelessly confused. However, if you code `x' by K&R standards, x (y, z) float y, z; { float w = y + z; } `x' assumes that the parameters are expanded to doubles the old fashioned way and everything works hunky dory. One of the reasons we got the 5.1 compiler was that someone said it was necessary for compiling Gnu CC. This bug is one more reason to go with Gnu. --