jamshid@emx.utexas.edu (Jamshid Afshar) (12/21/90)
Borland's Turbo C++ compiler (even in ANSI C mode) for MS-DOS may produce an executable which gives the error "floating point formats not linked", because the linker does not link in the fp code if it does not believe the code will be needed. The problem is it does not always catch the cases where the code is used. Anyway, this is well known and there is a work-around. I am wondering if an ANSI C compiler is allowed to exhibit this behavior. Borland refuses to call it a bug. I don't mean to nitpick or cause Borland grief on this subject (other subjects maybe), but I'm just curious if ANSI left some things about the link phase (if it even mentions one) unspecified. Just curious, Jamshid Afshar jamshid@emx.utexas.edu
diamond@tkou02.enet.dec.com ("diamond@tkovoa") (12/24/90)
Subject: Re: FP formats not linked-- still ANSI? In article <41712@ut-emx.uucp> jamshid@emx.utexas.edu (Jamshid Afshar) writes: >Borland's Turbo C++ compiler (even in ANSI C mode) for MS-DOS may >produce an executable which gives the error "floating point formats >not linked", because the linker does not link in the fp code if it >does not believe the code will be needed. The problem is it does not >always catch the cases where the code is used. Anyway, this is well >known and there is a work-around. I am wondering if an ANSI C compiler >is allowed to exhibit this behavior. Borland refuses to call it a bug. The standard does not specify what technique a user should use to invoke a conforming processor. If Borland says that the correct technique is the command line cc filename -flag_to_force_floating_point_code_to_be_linked then there does not seem to be a bug. (Kluge yes, bug no.) If Borland says that the correct technique is to go ahead and use the defaults, but the defaults produce error messages for correct programs, then Borland's implementation is not conforming and might even be considered fraudulent (in a minor way because the work-around is known.) I don't know what claims Borland makes, so both of the above hypothetical cases are for theoretical explanation only. Disclaimer: These are not my employer's hypothetical cases or theoretical explanations. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it.