(void *)

Henry Spencer henry at utzoo.UUCP
Sun Jul 28 09:44:51 AEST 1985


> 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'.

The obvious way to handle this one is to give "void *" the worst-case
representation, which will usually be that of "char *".  Since the code
that will use "void *" will be the same code that now uses "char *", it
would not appear that this will cause major efficiency problems that
weren't there already.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list