C Builtin Funxions

root rbj at icst-cmr
Fri Apr 11 03:06:26 AEST 1986


> In article <824 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
> 
> >In article <41 at cbmvax.cbmvax.cbm.UUCP>, daveh at cbmvax.UUCP writes:
> >>
> >>C, LISP, Pascal, BASIC, etc., all have standard built-in functions.
> >
> >C has standard built-in functions????
> >
> >Gee, that's a new one on me.  EVERY function called from C is an external 
> >function, or at least it was when C began. This includes things like write(),
> >read(), printf(), math functions, etc. There's no such thing as, for example,
> >a C builtin equivalent to the FORTRAN MAX() or the Basic INPUT which does the
> >right thing no what the arguments' types are, or where the returned result is
> >stored.  ...
> 
> That may be the original practice, but the X3J11 (ANSI C) drafts, now quite
> clearly say that all functions defined in the library are reserved (ie, you
> can't redefine them), and may be builtin to the compiler.  I believe that the
> /usr/group standard (& probably P1003) reserved every function from all major
> UNIX* variants.  It may be that redefining these reserved library functions
> will continue to work in *YOUR* implementation, but it's not guaranteed.
> 
> 	Michael Meissner, Data General
> 	...{ decvax, ihnp4 }!mcnc!rti-sel!dg_rtp!meissner
> 
> *UNIX is a trademark of AT&T in the U.S.A. and other countries.
 
Before I flame at the bogosity of this proposed madness, I will entertain
suggestions as to why this decision was made. Fire away.

However, most builtin funxions will accept user redefinitions. Will this
be allowed, or must we resort to #defines to avoid hacking up the
sources to change every funxion we wish to redefine. And will this even
work? It's conceivable that the preprocessor could be integrated with
the compiler proper and not a separate pass/program in some implementations.

On another note, `sizeof' is NOT a builtin funxion. It is merely a funny
way of writing an implementation defined constant.

ASM *is* a builtin in many implementations.

	(Root Boy) Jim Cottrell		<rbj at cmr>



More information about the Comp.lang.c mailing list