From: steve@quintile.net (Steve Simon)
Subject: [TUHS] origins of void*
Date: Sun, 5 Nov 2017 18:29:12 +0000 [thread overview]
Message-ID: <09628F7B-28C9-4F72-91E8-665AE5BF6425@quintile.net> (raw)
In-Reply-To: <B5BBD1D3-D549-451E-B774-5F156A077B58@ccc.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3100 bytes --]
I started out on Edition 7, this was
the interdata / perkin elmer port of v7 (based on Richard Milker’s work at Wollongong with some bits of 2.4BSD added in (csh and vi i remember).
i remember this having a modified v6 compiler which had the shared namespace fir all structure members (hence the stat.st_mtime and friends). but it also had structure assignment and enums.
anyone know where this fits into the compiler evolution, or was it an evolutionary dead end?
-Steve
> On 5 Nov 2017, at 17:53, Clem cole <clemc at ccc.com> wrote:
>
> Correct. When void came into C, full typing was already there; so void * was a part and it was first exploited because of the useful property of the return. The ptr properties became more and more important as its power was realized.
>
> FYI. K&R was written before V7 was released and matched the Typesetter C compiler for V6 more than the later compiler released in V7. i.e. A slightly more mature version compiler was included in UNIX/TS which was what Bourne used as the V7 ‘project manager’ (Steve had a couple interesting stories about the later process). By that point in time void had been added as formal type to the language.
>
> As since Bourne had been the driver for void it is not surprising that he picked up a version of the compiler that he thought was important. Thus as was noted it meant the book and released compiler were not in sync.
>
>
>
> Sent from my PDP-7 Running UNIX V0 expect things to be almost but not quite.
>
>> On Nov 5, 2017, at 7:14 AM, Warner Losh <imp at bsdimp.com> wrote:
>>
>> void functions certainly were much more widely used before void *, but void * worked on all the compilers I ever used. I'm a relative newcomer, though, since the first C compiler I used was on a VAX running 4.2BSD...
>>
>> Warner
>>
>>> On Sun, Nov 5, 2017 at 6:20 AM, Ron Natalie <ron at ronnatalie.com> wrote:
>>> 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 <pnr at planet.nl> 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
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171105/c7e07632/attachment-0001.html>
next prev parent reply other threads:[~2017-11-05 18:29 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-04 10:19 Paul Ruizendaal
2017-11-05 9:48 ` Clem Cole
2017-11-05 10:06 ` arnold
2017-11-05 13:20 ` Ron Natalie
2017-11-05 15:14 ` Warner Losh
2017-11-05 17:53 ` Clem cole
2017-11-05 18:29 ` Steve Simon [this message]
2017-11-05 20:12 ` Clem cole
2017-11-05 21:08 ` Chet Ramey
2017-11-05 21:38 ` Clem cole
2017-11-05 21:53 ` Steve Simon
2017-11-05 20:44 ` Paul Ruizendaal
2017-11-05 21:06 ` Warner Losh
2017-11-06 7:24 ` arnold
2017-11-06 15:02 ` Warner Losh
2017-11-06 21:46 ` [TUHS] origins of void* -- Apology! Steve Johnson
2017-11-06 22:18 ` Warner Losh
2017-11-07 0:25 ` Ron Natalie
2017-11-07 0:34 ` Arthur Krewat
2017-11-07 0:36 ` Ron Natalie
2017-11-07 1:09 ` Bakul Shah
2017-11-07 1:55 ` Ron Natalie
2017-11-08 17:44 ` Ralph Corderoy
2017-11-08 19:56 ` Ron Natalie
2017-11-08 20:39 ` Don Hopkins
2017-11-08 20:42 ` Ron Natalie
2017-11-08 20:47 ` Don Hopkins
2017-11-08 20:48 ` Don Hopkins
2017-11-08 20:43 ` Don Hopkins
2017-11-08 20:43 ` Clem Cole
2017-11-08 20:45 ` Warner Losh
2017-11-09 6:33 ` Lars Brinkhoff
2017-11-08 20:50 ` Steve Nickolas
2017-11-08 21:25 ` Bakul Shah
2017-11-09 6:37 ` Lars Brinkhoff
2017-11-09 7:14 ` Don Hopkins
2017-11-09 7:44 ` Lars Brinkhoff
2017-11-10 23:43 ` [TUHS] PowerPC, bit twiddling - was " Toby Thain
2017-11-10 23:58 ` Ralph Corderoy
2017-11-05 15:43 [TUHS] origins of void* Noel Chiappa
2017-11-05 16:58 ` Steve Johnson
2017-11-06 0:37 Doug McIlroy
2017-11-06 4:59 ` Steve Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09628F7B-28C9-4F72-91E8-665AE5BF6425@quintile.net \
--to=steve@quintile.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).