Operations on pointers to void.
Henry Spencer
henry at zoo.toronto.edu
Tue Aug 14 03:21:04 AEST 1990
In article <1990Aug12.231202.23826 at druid.uucp> darcy at druid.uucp (D'Arcy J.M. Cain) writes:
>I'll buy the argument about -pedantic but in general I think it is useful
>to be able to manipulate generic data. Things like memcpy for example. We
>know that the data can be any type but we want to treat it as bytes. Perhaps
>we need a new type which acts like void * but allows pointer arithmetic based
>on the smallest data type supported by the system...
It's called `char *'. :-) The various tricky implementations in which it
would not be a valid "generic pointer" have pretty well all been outlawed
by various rules in ANSI C. Note that `void *' and `char *' are constrained
to have the same representation.
--
It is not possible to both understand | Henry Spencer at U of Toronto Zoology
and appreciate Intel CPUs. -D.Wolfskill| henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list