Expressions in initializers

Timo Suhonen suhonen at kunto.jyu.fi
Thu Mar 7 19:43:47 AEST 1991


rjc at uk.ac.ed.cstr (Richard Caley) writes:

   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?

Doesn't ANSI standard let the compiler know the standard functions???
If so, then sqrt(double) can be evaluated at compile time. And I
think that is just what every compiler SHOUD do!
--
Timo Suhonen        I am logged in, therefore I am        suhonen at nic.funet.fi
                                                          suhonen at kunto.jyu.fi
   Opinions(?) are mine (if not stolen), NOT those of Univ. of Jyvaskyla.



More information about the Comp.lang.c mailing list