[comp.sys.m6809] Intrinsics

gwyn@brl-smoke.ARPA (Doug Gwyn ) (03/31/88)

In article <2108@svax.cs.cornell.edu> belmonte@sleepy.cs.cornell.edu (Matthew Belmonte) writes:
>As I said before, nothing practical prevents one from including the
>semantics of standard functions in compilers.

An implementation note:  ANSI C (as currently proposed) permits an
implementation to provide macro definitions for "functions" in the
standard headers.  However, the library must include actual functions
so that pointers to them can be used.  A programmer needing to access
an actual function would first have to #undef the possible macro.

Thus, although the compiler is not allowed to treat sqrt() (for
example) as an intrinsic, it IS allowed to treat __sqrt() as one,
with <math.h> defining sqrt to be __sqrt.  The programmer need not
be aware that an intrinsic is being used.

Now that there (almost) is a standard for the C library, it becomes
more rewarding to implement several common functions as intrinsics.