Should I convert FORTRAN code to C?
Tom Stockfisch
tps at chem.ucsd.edu
Tue Jun 14 08:47:32 AEST 1988
In article <522 at white.gcm> dc at white.UUCP (Dave Caswell) writes:
>Is it true that some compilers generate inline code for strcpy, fabs
>and a host of other functions? How does the compiler know that I will
>be linking with the standard library?
The scheme used by the compiler on our machine (Celerity 1260D) is to
enable inlining only if the library loader flag is given in the
command for *compiling* (not just linking). E.g., to get in-line exp(),
fabs(), etc., compile as
cc -c foopack.c -lm
cc main.o foopack.o -lm
If you want to define your own fabs(), etc., then compile as
cc -c foopack.c
cc main.o foopack.o -lm
Considering the viability of this scheme (that does not require
reservation of any library names) and the undesirability of
ecologically disastrous name-space pollution, does anyone know
why the ANSI C committee chose to reserve all these names?
--
|| Tom Stockfisch, UCSD Chemistry tps at chem.ucsd.edu
More information about the Comp.lang.c
mailing list