Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: TC++: "floating point formats not linked" Message-ID: <15406@smoke.brl.mil> Date: 10 Mar 91 19:31:31 GMT References: <1991Feb9.193059.14322@ucselx.sdsu.edu> <279@nazgul.UUCP> Organization: U.S. Army Ballistic Research Laboratory (BRL), APG, MD. Lines: 17 In article <279@nazgul.UUCP>, bright@nazgul.UUCP (Walter Bright) writes: - In article <15316@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: - /You could of course also have the compiler pay special attention to the - /format strings for *scanf() and *printf(), although that is not foolproof. - I think this would be a bug in the compiler for these reasons: - 1. The format strings may not be available to the compiler, as they - may be built dynamically or be in another module. - 2. The library is supposed to be independent of the compiler. Having the - compiler recognize these things could make it very problematical if - somebody rolled their own printf/scanf. 1. When string literals WERE used, the compiler would be free to use that fact. 2. A conforming hosted implementation includes library and language together; a strictly conforming program is NOT allowed to provide its own replacement for any of the standard library functions.