Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: (void *) Message-ID: <203@brl-tgr.ARPA> Date: Fri, 26-Jul-85 14:31:50 EDT Article-I.D.: brl-tgr.203 Posted: Fri Jul 26 14:31:50 1985 Date-Received: Sun, 28-Jul-85 08:04:17 EDT References: <1035@homxa.UUCP> <921@umcp-cs.UUCP> <2462@sun.uucp> <318@baylor.UUCP> Organization: Ballistic Research Lab Lines: 14 > I just realised a major problem with (void *). On machines like the HP-1000 > a pointer to a byte and a pointer to a word don't have the same bit-pattern. This is true of most word-addressed machines. > How are you supposed to deal with this without having a terribly in-efficient > implementation of 'C'. Why is this a problem? That is what (void *) is specifically meant to deal with. Assigning to or from a (void *) datum on such a machine will involve mapping to/from a canonical pointer representation, but that is what (char *) is currently used for anyhow. Presumably a (void *) would look just like a (char *). The main reason for different types is to allow meaningful stricter type-checking, especially of malloc() values.