>In article <11************ *@dscnews2.dccc d.edu"Rod Pemberton"
><do*********@b itfoad.cmmwrite s:
>Chris Torek has covered this in the past... 'void main' predates all formal
C standards except K&R (1979). The links below indicate 'void' was for the
PCC compiler for 4.1c BSD (about 1981).
In article <J3********@cwi .nl>, Dik T. Winter <Di********@cwi .nlwrote:
>Read [the link] it is *not* about "void main"...
Indeed, it was about "void" itself. Of course if "void" were
simply "#define"d to "int", one could write:
#define void int
void main() { return 42; }
and the like; but this is equivalent to writing:
#define purple int
purple main() { return 42; }
Neither one is particularly sensible. If main() is to return an
"int" value, one might as well write "int main()" (or, in modern
C, "int main(void)"). (Of course one can add argc and argv as
usual.)
As an aside, "void" and PCC (Steve Johnson's Portable C Compiler)
long predate 4.1cBSD as well. The original BSD distributions were
on PDP-11s and related to V6 and V7 (Ken Thompson spent some time
at Berkeley, if I remember right) and at some point acquired the
PDP-11 version of PCC; the first VAX BSD distributions were derived
from 32V, which was sort of an offshoot of PWB Unix, and used PCC
from the beginning. Hence 3.0BSD, 4.0BSD, 4.1BSD, and both the
"a" and "b" versions of 4.1BSD (4.1a and 4.1b) used PCC along with
4.1c. The "a" through "c" versions were just various snapshots
along the way to the original 4.2BSD release, which was the first
"non-beta" release of sockets, fast file system, and so on.
(32V PCC had 8-character symbols as usual; I think it was somewhere
between 3.0 and 4.0BSD that Berkeley modified the compilers and
linkers to support longer names -- up to 1023 characters -- although
that may have been as late as 4.1BSD. This was probably mostly
for Berkeley Pascal, which strung nested function names together
with underscores. "Stabs" symbolic debugging was shoehorned in
shortly afterward, with Mark Linton's "dbx" debugger, which was
perhaps the first symbolic debugger for C code, although it was
originally part of the whole Pascal system.)
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it
http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.