Expressions in initializers

Doug Gwyn gwyn at smoke.brl.mil
Mon Mar 11 04:36:15 AEST 1991


In article <17294 at crdgw1.crd.ge.com> volpe at 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.



More information about the Comp.lang.c mailing list