void *
VLD/VMB
gwyn at BRL.ARPA
Wed Apr 23 05:12:04 AEST 1986
You're mixing two features of malloc(). Malloc() should return (void *),
which is a generic pointer type to/from which all other pointer types
may be cast without loss of information. (This is the only use of
(void *), and it is the only universal pointer type; other pointer
casts can be non-portable.) Malloc() ALSO guarantees that the pointer
it returns is suitably aligned for safe casting to ANY pointer type.
This is a property of malloc(), not of (void *).
More information about the Comp.lang.c
mailing list