Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: TC++: "floating point formats not linked" Message-ID: <15316@smoke.brl.mil> Date: 25 Feb 91 16:55:25 GMT References: <1991Feb9.193059.14322@ucselx.sdsu.edu> <268@nazgul.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14 In article <268@nazgul.UUCP> bright@nazgul.UUCP (Walter Bright) writes: >I'm all ears if anyone has a suggestion on how to get the best of both >by default. What I did when I maintained the Ritchie PDP-11 C compiler was to arrange for the compiler to generate a reference to some symbol like "__fltused" whenever there was ANY use of floating point, even simply a declaration of a type whose base type was float or double, in a translation unit. Of course the system C library was set up so that a reference to "__fltused" caused the full format support to be linked rather than the usual integer-only format support object module. You could of course also have the compiler pay special attention to the format strings for *scanf() and *printf(), although that is not foolproof.