Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Newsgroups: comp.std.c Subject: Re: Common malloc/free practice violates ANSI standard ? Message-ID: <1989Oct24.112715.19918@jarvis.csri.toronto.edu> Date: 24 Oct 89 15:27:15 GMT References: <1989Oct14.043811.669@anucsd.oz> <1989Oct19.101306.16791@twwells.com> <1328@crdos1.crd.ge.COM> Lines: 15 davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes: >You can cast *to* a void pointer and *back* without loss of information, but >not the other way 'round. This is fine, but why can't we just say that the return value from malloc() represents a pointer which can be assumed to have been casted to (void *) from whatever type you like? This is another way to say the "suitably aligned" rap. (Flame retardant: I'm not claiming that the draft does in fact say it in this way, just claiming that this is a good way to think of it.) ajr -- Vs encr vf n xvaq bs frk, gura n chapu va gur zbhgu vf n xvaq bs gnyxvat.