Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.sys.m6809 Subject: Re: Intrinsics (was: E)Don't use Scanf() Message-ID: <7593@brl-smoke.ARPA> Date: 31 Mar 88 10:36:45 GMT Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 Keywords: C stdio library 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 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.