The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: scj@yaccman.com
To: The Unix Heritage Society mailing list <tuhs@tuhs.org>
Subject: Re: [TUHS] Question: stdio - Who invented and ...
Date: Sun, 10 May 2020 18:00:27 -0700	[thread overview]
Message-ID: <94b40dae0dba9d37b2de778b2d32e80a@yaccman.com> (raw)
In-Reply-To: <m1jGYtU-0036tPC@more.local>

I can't help with enum.  It sticks in my mind that some other language 
had something similar but details are gone.
However, void was more interesting.   The original default return type 
for both B and C was int.  As part of doing lint, I started wondering 
whether it would be good to have a message "function returns a value 
that is unused".  In some cases, this would be a really useful message.  
That feature never made it into lint, but the idea persisted, and Dennis 
and I discussed void as a keyword to say "I'm not returning anything".  
It became useful as a message if you try to return a value from a 
function declared as void.

But the real brilliance, to my mind, was the invention of void *.  Larry 
Rosler and I were at a Usenix meeting together, and after a bit of 
alcoholic lubrication, I started complaining about trying to use malloc 
and also have strong typing.  Larry suddenly said -- "we need a pointer 
that can't be indirected through, but can be assigned to any other 
pointer!" and after a minute or so he said "void *.  We should call it 
void * ."

My memory is that Dennis was instantly enthusiastic and it was in PCC a 
day or two later.

Steve

---


On 2020-03-23 19:02, Greg A. Woods wrote:
> At Mon, 23 Mar 2020 09:46:52 -0400, Clem Cole <clemc@ccc.com> wrote:
> Subject: Re: [TUHS] Question: stdio - Who invented and ...
>> 
>> I've forgotten when 'enum' and 'void' got added (which are not in the 
>> white
>> book - Steve Johnson or Doug may remember).   But, I think they were 
>> in the
>> V7 compiler, and not Typesetter C.
> 
> Since I was recently researching these myself:
> 
> There was an extra page in the 7th Edition manual titled "Recent 
> Changes
> to C" which described both structure assignment and the enumeration
> type:
> 
> 	https://www.bell-labs.com/usr/dmr/www/cchanges.pdf
> 
> This paper appears in the UNIX System III "The C Programming Language
> Reference Manual", but there's no mention of "void" in that manual.  On
> the other hand the UNIX System III PDP-11 compiler mentions "void" 
> (1980).
> 
> I don't see any mention of "void" in 7th Edition sources.  However the
> version of 'awk' on the v7addenda tape from "12/2/80" has one "(void)"
> cast.  The only mention of "void" in dmr's "The Development of the C
> Language" paper (from HOPL-II, 1993) seems to be in the
> "Standardization" section where it's mentioned that it's not described
> in the first edition of K&R.  There's mention in the CSTR#102 paper 
> from
> Sept. 1981 of the "void" type.  The 2.9BSD code uses "void", but the
> sources I have don't include a copy of the compiler.
> 
> --
> 					Greg A. Woods <gwoods@acm.org>
> 
> Kelowna, BC     +1 250 762-7675           RoboHack <woods@robohack.ca>
> Planix, Inc. <woods@planix.com>     Avoncote Farms <woods@avoncote.ca>

      reply	other threads:[~2020-05-11  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 10:18 Ed Bradford
2020-03-23 10:32 ` arnold
2020-03-23 13:46   ` Clem Cole
2020-03-23 13:59     ` arnold
2020-03-23 14:24       ` Jaap Akkerhuis
2020-03-23 14:45         ` Clem Cole
2020-03-23 18:47         ` Richard Salz
2020-03-23 19:22           ` Jaap Akkerhuis
2020-03-23 21:38     ` Dave Horsfall
2020-03-24  2:02     ` Greg A. Woods
2020-05-11  1:00       ` scj [this message]

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=94b40dae0dba9d37b2de778b2d32e80a@yaccman.com \
    --to=scj@yaccman.com \
    --cc=tuhs@tuhs.org \
    /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).