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: 9 Mar 91 18:29:07 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: 23 In-reply-to: suhonen@kunto.jyu.fi's message of 7 Mar 91 09:43:47 GMT In article , Timo Suhonen (ts) writes: rjc@uk.ac.ed.cstr (Richard Caley) writes: rjc> Is it possible to know before the program is linked (run if you have rjc> run time linking!). What stops me from defining my own sqrt? ts> Doesn't ANSI standard let the compiler know the standard functions??? ts> If so, then sqrt(double) can be evaluated at compile time. And I ts> think that is just what every compiler SHOUD do! Thank's to everyone who let me know this. I hadn't realised it, not having the stamina to read the standard. On the other hand, not all the world is ANSI, and even if it were this does not imply that you can (easily) do run time evaluation. Gratuitous moan: While I understand the reasons for this restriction, it _is_ ugly as sin and does mean you need to have a linker which understands C. -- rjc@cstr.ed.ac.uk