Xref: utzoo comp.lang.c:15016 comp.sys.ibm.pc:22509 Path: utzoo!attcan!uunet!mcvax!unido!materna!uh From: uh@materna.uucp (Uwe Hoch) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Difficulties with Turbo-C 2.0 TLIB Keywords: TLIB 2.0 considered harmful (:-)) Message-ID: <428@materna.uucp> Date: 21 Dec 88 10:15:17 GMT References: <458@astbe.UUCP> Reply-To: uh@materna.UUCP (Uwe Hoch) Organization: Dr.Materna GmbH, Dortmund Lines: 59 In article <458@astbe.UUCP> mey@astbe.UUCP (Thomas Meyer) writes: > >Did anyone had similar experiences and can give an explanation ? >Are there more known bugs ? Yes, we found two bugs and one documentation fault in the german handbooks of TC 2.0. 1. If the pseudo-function "__emit__" should be used, the file "dos.h" MUST be included. Otherwise the compiler fails with a curios error message. This is NOT documented in the german handbooks. 2. In the following program the linker fails to include the format functions for scanf. #include void y (float *R) { sscanf("1.24","%f",R); } void x (void *Data) { y((float *)Data); } void main (void) { float R; x(&R); } Question: Is this a compiler or a linker error??? The same program works fine with MS-C 5.1. 3. The function "intr" of the standard library works not always correct. The BP-Register is not set up with the value you put into the corresponding data structure. The error seems to be, that the wrong offset is computed to get BP from the stack (the last statment before the assembly "int" statment). I found the error in all model libraries with the Turbo Debugger (very good tool for debugging Turbo C :-) ). Also I have patched the libraries, so that the function now works fine. Unfortunately I have no sources of the library functions, so if someone has them, he can look for the error. The last two errors have been reported to Heimsoeth Software, the offical german distributor of Borland two or three weeks ago, but the guys have not sent any answer to me until now. Though I'm still a fan of all Borland products, especially of the new debugger. Uwe Hoch Dr. Materna GmbH Vosskuhle 38 D-4600 Dortmund 1 West Germany E-Mail: USENET: uh@materna.uucp ..!seismo!mcvax!unido!materna!uh