Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!bionet!ames!uhccux!munnari.oz.au!mimir!hugin!augean!idall From: idall@augean.OZ (Ian Dall) Newsgroups: comp.lang.c Subject: Re: effect of free() Message-ID: <591@augean.OZ> Date: 20 Sep 89 07:12:04 GMT References: <319@cubmol.BIO.COLUMBIA.EDU> <3756@buengc.BU.EDU> <1989Aug17.005548.745@twwells.com> <16022@vail.ICO.ISC.COM> <248@seti.inria.fr> <246@ssp1.idca.tds.philips.nl> <21952@cup.portal.com> <10983@smoke.BRL.MIL> Organization: Engineering Faculty, University of Adelaide, Australia Lines: 28 Reply-To: In article <10983@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <21952@cup.portal.com> Tim_CDC_Roberts@cup.portal.com writes: >>Isn't this a quality of implementation issue? ... Thus, in the case above, >>I would insist that the compiler writer move the address to a general-purpose >>register and do the comparison there. > >It runs contrary to the "spirit of C" to require the implementation to >generate code that does operations the hard way when a more natural way >would suffice. It violates the law of least surprises to have variables suddenly made inaccessable by being a call by value argument to a function. C used to be a language where I felt comfortable because I had a pretty good idea of its basic principles. The concept of variables becoming invalidated by function calls seems to my very counter-intuitive and unless there is a STRONG efficiency argument on a reasonably desirable architecture, then I think compilers should be required to do the comparison in such a way that they don't generate traps. . . . -- Ian Dall life (n). A sexually transmitted disease which afflicts some people more severely than others. idall@augean.oz