How to get Ada private types in C

guy at gorodish.UUCP guy at gorodish.UUCP
Sat Mar 14 11:24:43 AEST 1987


>In 4BSD, the generic pointer type is `caddr_t' (Core ADDRess Type);

Well, "caddr_t" isn't specific to 4BSD; other versions of UNIX have it.
However, it's not really a "new" type; it's just a "typedef" name for
"char *".

>in ANSI draft C it is `void *' (a name that I find utterly lacking in taste,
>though it does avoid a new keyword).

An argument can be made that the name "void *" emphasises that these
pointers cannot be dereferenced, since dereferencing a "void *" would yield
a "void".  If this was, in fact, a reason why "void *" was chosed to be the
name of the "generic pointer" type, this should perhaps appear in the
Rationale.



More information about the Comp.lang.c mailing list