Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: The free() thing and function names Message-ID: <804@sdrc.UUCP> Date: 16 Sep 89 20:25:37 GMT References: <1989Sep14.022055.5961@twwells.com> <841@uniol.UUCP> <1989Sep15.183248.2955@utzoo.uucp> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 32 In article <1989Sep15.183248.2955@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > In article <841@uniol.UUCP> lehners@uniol.UUCP (Joerg Lehners) writes: > >What does the standard say about standardized function overriding ? > > The answer is a little complicated. Assuming you just want to use a > standard function's name for your own purposes, you can always do this > provided (a) it doesn't begin with __ or _[A-Z], and (b) you do not > #include the standard header declaring that function. If either of these > restrictions is violated, behavior is "undefined", i.e. it's up to your > compiler and it's not portable. That's true provided that you do not use it for an external variable or function. The names of library routines are reserved in the external name space and may not be redefined reguardless of whether you #include the associated header. > ANSI C > essentially demands that scanf() not call atof() at all, but some internal > version with a name in the implementation-reserved name space (see clause > (a) above). Nope, standard library routines are at liberty to call other standard library routines at will. What they may NOT do is call anything OTHER than a standard library routine unless it has a reserved name as in (a) above. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@SDRC.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 "I have plenty of good sense. I just choose to ignore it." -Calvin