Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aipna!rjc From: rjc@uk.ac.ed.cstr (Richard Caley) Newsgroups: comp.lang.c Subject: Re: Expressions in initializers Message-ID: Date: 5 Mar 91 19:54:14 GMT References: <17270@crdgw1.crd.ge.com> <760@ajpo.sei.cmu.edu> <1991Mar4.144939.8311@ux1.cso.uiuc.edu> <1991Mar5.042141.21825@grebyn.com> Sender: news@aipna.ed.ac.uk Organization: Center for Speech Technology Research Lines: 17 In-reply-to: ckp@grebyn.com's message of 5 Mar 91 04:21:41 GMT In article <1991Mar5.042141.21825@grebyn.com>, Checkpoint Technologies (ct) writes: In article <1991Mar4.144939.8311@ux1.cso.uiuc.edu> mcdonald@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@cstr.ed.ac.uk