From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron@ronnatalie.com (Ron Natalie) Date: Sun, 5 Nov 2017 08:20:42 -0500 Subject: [TUHS] origins of void* In-Reply-To: <201711051006.vA5A6BO2032436@freefriends.org> References: <33ABE931-7E70-4C99-B289-2D3F6BDA1EBE@planet.nl> <201711051006.vA5A6BO2032436@freefriends.org> Message-ID: Yes. Correct me if I’m wrong, but I recall functions returning void came before void*. Sent from my iPhone > On Nov 5, 2017, at 5:06 AM, arnold at skeeve.com wrote: > > Paul Ruizendaal wrote: > >> I’m trying to understand the origins of void pointers in C. I think >> they first appeared formally in the C89 spec, but may have existed in >> earlier compilers. > > void was added after the publication of the first edition of K&R, in > the V7 time frame. The 4.x compilers had support for void pointers and > functions returning void. Also added around the same time was structure > assignment and the ability to pass and return structs by value (although > this was little used). > >> In the 4BSD era there was caddr_t, which I think was used for pretty >> much the same purposes. > > Only for kernel code. I am pretty sure caddr_t wasn't used in user-land code. > > HTH, > > Arnold