Thread (38 messages) 38 messages, 5 authors, 2026-01-12

Re: [PATCH v1 19/25] man/man3type/void.3type: HISTORY: Update first POSIX appearance of void(3type)

From: Adam Sampson <hidden>
Date: 2026-01-10 22:32:50

Alejandro Colomar [off-list ref] writes:
I think 'void*' is important enough that it would be useful to dig in
its history further.  Was it an invention of C89?  Or was it an
extension in some existing compilers?  If the latter, it would be
interesting to document which systems had it before C89.
From evidence in the utzoo Usenet archive, the idea was around before
the ANSI C effort.

The first mention of "void *" is in November 1982, where Ken Dalka
(ihuxe!dalka) observed in net.lang.c that void * was accepted as a type.
He didn't say which compiler was being used, but an earlier post said
ihuxe "runs USG 4.0 UN*X".

The next is from Mary Ann Horton (mark@cbosgd.UUCP) in January 1984,
also in net.lang.c, who suggests using "(void *) 0" as a definition of
NULL, giving a varargs function with args terminated by NULL as an
example.

Then in March 1984, Doug Gwyn (gwyn@Brl-Vld.ARPA) says, as part of a
discussion about casting the result of malloc in net.unix-wizards:
The C Language Standards Committee was talking about adding
(void *) to the language as a generic pointer type.  Perhaps
that will eventually help...
It then shows up in various posts in both of those groups throughout
1984, including a summary by Henry Spencer in June 1984 of Larry
Rosler's presentation on the ANSI C project at Usenix saying:
II.  "void *" is a new kind of pointer, which cannot be dereferenced but
	can be assigned to any other type of pointer without a cast.  The
	idea here is that "char *" is no longer required to be the
	"universal" pointer type which can point to anything.  So for
example, the declaration of fread earlier really should go:

	extern int fread(void *, int, int, FILE *);

(People who have machines where all pointers have the same
representation, don't complain.  You are lucky.  Others aren't.)
Thanks,

-- 
Adam Sampson [off-list ref]                         <http://offog.org/>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help