Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: (void *) Message-ID: <2500@sun.uucp> Date: Sat, 27-Jul-85 06:02:53 EDT Article-I.D.: sun.2500 Posted: Sat Jul 27 06:02:53 1985 Date-Received: Sun, 28-Jul-85 06:21:11 EDT References: <1035@homxa.UUCP> <921@umcp-cs.UUCP> <2462@sun.uucp> <318@baylor.UUCP> Organization: Sun Microsystems, Inc. Lines: 16 > 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. > How are you supposed to deal with this without having a terribly > in-efficient implementation of 'C'. This problem already exists in C. "malloc" returns a "char *"; it requires work to turn it into an "int *". After "void *" becomes available, "malloc" will return a "void *" (which would either be a byte pointer - in which case the generated code would be exactly the same - or a word pointer, in which case the code assigning the result to a "char *" would have to convert and the code assigning it to another kind of pointer probably wouldn't.) "void *" introduces no problems of this sort that aren't already in C due to the existence of "char *". Guy Harris