Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: The free() thing and function names Message-ID: <11073@smoke.BRL.MIL> Date: 15 Sep 89 11:58:49 GMT References: <1989Sep14.022055.5961@twwells.com> <841@uniol.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 26 In article <841@uniol.UUCP> lehners@uniol.UUCP (Joerg Lehners) writes: >Don't hardcode any (even standard) functions into the compiler. >What about writing my own free() function, possibly with a completly >different semantic ? You absolutely must NOT do that in a hosted implementation. Several library routines may depend, not only on the documented semantics of an external function named free(), but also on implementation-specific internal properties of the free() implementation. If you provide your own external function named free(), you can break the implementation. >What does the standard say about standardized function overriding ? A program that does that is not strictly conforming. >Maybe one have to distingish between > a.) C-Compiler: just the C keywords are reserved, > function overriding possible and possible more. > b.) C-System (C-Compiler plus standardized function package [often > called 'library']: C keywords reserved; return type, argument types > of standardized functions reserved; and more. The Standard provides for two forms of conforming implementation: "hosted" (for which the standard headers and standard library are provided), and "free-standing" (which provides only minimal header and library support).