The hack Richard refers to was that, at least on the PDP-11, the C
compiler emitted a reference to a symbol called `_fltused' if and only
if a floating-point variable, function or constant was seen when
compiling a given source file (as I recall).  _fltused was defined
only in the file containing the %[efg] output conversions for printf.
The PDP-11 implementation relied on having a dummy version of the FP
routines later in the library (and upon the loader observing ordering
within a library) so that the generic printf could call the %[efg]
routines, but today we could probably do that with a function pointer
(nil if no %[efg] routines loaded, so don't call them).  It seemed to
me to be a simple and elegant hack that we could revive if the space
consumption really matters.

Reply via email to