Expressions in initializers

Richard Caley rjc at uk.ac.ed.cstr
Wed Mar 6 05:54:14 AEST 1991


In article <1991Mar5.042141.21825 at grebyn.com>, Checkpoint Technologies (ct) writes:

In article <1991Mar4.144939.8311 at ux1.cso.uiuc.edu> mcdonald at aries.scs.uiuc.edu (Doug McDonald) writes:

dmd> sqrt(2.0) is an expression. It CAN be evaluated at compile time.
dmd> Perhaps some people don't want to write compilers that do that
dmd> (i.e.  they are too lazy), but it most certainly CAN be
dmd> evaluated.

ct> You are assuming that the compiler knows what the function sqrt(double)
ct> does.  I think I've heard of a few that do.  Most don't.

Is it possible to know before the program is linked (run if you have
run time linking!). What stops me from defining my own sqrt?

--
rjc at cstr.ed.ac.uk	



More information about the Comp.lang.c mailing list