Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!voder!pyramid!prls!philabs!ttidca!quad1!few From: few@quad1.quad.com (Frank Whaley) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo-C bug Message-ID: <1675@gouda.quad.com> Date: 1 Jun 89 20:58:19 GMT References: <2556@Portia.Stanford.EDU> Reply-To: few@gouda.quad.com (Frank Whaley) Distribution: na Organization: Quadratron Systems, Westlake Village, CA Lines: 21 In article <2556@Portia.Stanford.EDU> hobbes@Portia.Stanford.EDU (Andrew Zimmerman) writes: >The following program doesn't run when compiled under Turbo-C 2.0. Ooh, an interesting bug I hadn't seen before. Yes, when TC realizes that floating-point library code should be included, it puts a reference to the external symbol __turboFloat into the object file. This reference causes the f-p code to be loaded. You found a case where this was overlooked. I got around the problem by adding the line: static void UNUSED(){_turboFloat();} to the source file. This kludge requires only 4 bytes for small code models (CALL 0000;RET) and 6 for large code models. -- Frank Whaley Senior Development Engineer Quadratron Systems Incorporated few@quad1.quad.com uunet!ccicpg!quad1!few Water separates the people of the world; Wine unites them.