Re: [PATCH v1 19/25] man/man3type/void.3type: HISTORY: Update first POSIX appearance of void(3type)
From: Seth McDonald <hidden>
Date: 2026-01-10 07:57:56
Hi Alex, On Friday, 9 January 2026 at 20:34, Alejandro Colomar [off-list ref] wrote:
Hi Seth,
[...]
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. I'm mentioning this just in case you know. Feel free to ignore otherwise.
I know that the void pointer type was not mentioned or used in POSIX.1-1988. Instead, the standard used the char pointer type for pointers to generic data. POSIX.1-1990 seems to implicitly require void pointers - at least for conformance to "POSIX.1, C Language Binding (C Standard Language-Dependent System Support)" - by including them in some function prototypes. Looking at C89, it did explicitly specify void pointers as part of the language, stating that "[a] pointer to void shall have the same representation and alignment requirements as a pointer to a character type."[1] Looking* at K&R C, I skimmed through chapter 5 "Pointers and Arrays", and couldn't find any references to void pointers. In fact, it seems to use char pointers instead, similar to POSIX.1-1988. So I think what happened (pure speculation) was between 1978 and 1989, void pointers increased in user popularity and compiler support enough that ANSI decided to extend the language by adding void pointers to its 1989 C standard. Which would explain why POSIX.1-1988 also didn't have void pointers, but POSIX.1-1990 suddenly did. With regard to implementation support for void pointers prior to C89, this is where my knowledge falls short. I'm not the most educated on past implementations (yet). *I found this[2] PDF online which appears to be a scan of a (heavily annotated) copy of the first edition of The C Programming Language. I don't know if it's authentic though, so take it with a grain of salt. ---- [1] ANSI X3.159-1989 "Programming Language – C", Section 3.1.2.5 "Types", p. 24. <https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub160.pdf> [2] Kernighan, Brian W., Ritchie, Dennis M. (1978). The C Programming Language (1st ed.). <https://retrofun.pl/wp-content/uploads/sites/2/2023/12/1978-ritchie-the-c-programming-language.pdf> ---- Seth McDonald. sethmcmail at pm dot me (mailing lists) 2336 E8D2 FEB1 5300 692C 62A9 5839 6AD8 9243 D369
Attachments
- signature.asc [application/pgp-signature] 343 bytes