TC++: "floating point formats not linked"

Doug Gwyn gwyn at smoke.brl.mil
Mon Mar 11 05:31:31 AEST 1991


In article <279 at nazgul.UUCP>, bright at nazgul.UUCP (Walter Bright) writes:
- In article <15316 at smoke.brl.mil> gwyn at 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.



More information about the Comp.lang.c mailing list