Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!rex!uflorida!gatech!mcnc!uvaarpa!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Expressions in initializers Message-ID: <15403@smoke.brl.mil> Date: 10 Mar 91 18:36:15 GMT References: <760@ajpo.sei.cmu.edu> <1991Mar4.144939.8311@ux1.cso.uiuc.edu> <17294@crdgw1.crd.ge.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <17294@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: >"The square root of two" can be evaluated at compile time, but "sqrt(2.0)" >is an invocation of a function. How is the compiler supposed to know >what sqrt is? In a conforming hosted implementation, the external identifier "sqrt" is reserved for the standard sqrt() function, and an implementation is entitled to exploit that fact to, for example, substitute in-line code that accesses floating-point hardware directly, rather than actually perform a full C function call.