Xref: utzoo comp.std.c:1924 comp.lang.c:23155 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!rpi!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Common malloc/free practice violates ANSI standard ? Message-ID: <1328@crdos1.crd.ge.COM> Date: 23 Oct 89 14:51:05 GMT References: <1989Oct14.043811.669@anucsd.oz> <1989Oct19.101306.16791@twwells.com> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Followup-To: comp.std.c Organization: GE Corp R&D Center Lines: 16 In article <1989Oct19.101306.16791@twwells.com>, bill@twwells.com (T. William Wells) writes: | The standard requires that casting from (void*) to (OBJ*) and back | give pointers that compare equal and point to the same object. | Free will have no problems with it. I think you said this backward (or you misread it). You can cast *to* a void pointer and *back* without loss of information, but not the other way 'round. On machines which require allignment at all, assignment to a pointer to an alligned type may result in loss of information via rounding. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon