Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!tekgen!tekigm2!marks From: marks@tekigm2.TEK.COM (Mark D. Salzman) Newsgroups: comp.sys.ibm.pc Subject: MicroSoft C Ver 5.0 BUG!! Message-ID: <2276@tekigm2.TEK.COM> Date: 19 Dec 87 00:49:06 GMT Reply-To: marks@tekigm2.UUCP (Mark D. Salzman) Distribution: na Organization: Tektronix, Inc., Beaverton, OR. Lines: 30 Hi out there, A friend of mine just discovered a bug in Microsoft C Ver. 5.0 that crashes the "cl" compiler. I offer it so others can avoid the problem until Microsoft produces a fix (if ever). BTW, Microsoft has been informed on the matter. The following short program produces the bug. double a,b = 3.0; main() { a = (b * 1.7E-9) + ((b * 1.9E-9) * 1.0E-4); /* <-- This crashes "cl" */ } The "cl" compiler crashes with the following error message: run-time error R6000 - stack overflow Note that this works fine under Ver 4.0 and if you use Quick C. It also works fine if you replace any of the constants with a variable. The value of the constants have no effect on the bug as long as they are still clearly floating point constants. The variable names used also have no effect. I hope this prevents some headaches. Happy Programming. -- Mark D. Salzman Phone (206) 253-5542. | The more complex the mind, Tektronix Inc., P.O. Box 3500, M/S C1-937 | the greater the need for Vancouver, Washington. 98668 | the simplicity of play. {world_at_large}!tektronix!tekigm2!marks | James T. Kirk