The Development of the C Language (2003)
cm.bell-labs.co
cm.bell-labs.co
[1] https://inbox.vuxu.org/tuhs/ZKyl8drfW%2FBs1LVa@minnie.tuhs.o...
Nowadays, AmigaDOS sounds like a true antiquity but at the time, I remember I always found the shell surprisingly capable and modern! Especially for what was first and foremost a home entertainment system (although Commodore didn't want it to be only that). We even mounted volumes under arbitrary names, much like on Unix, had RAM drives and even RAD drives -- semi-persistent drives that made use of the fact that its RAM circuits were persistent enough to survive reboots!
I absolutely felt like I was thrown back in time when finally going PC and I suddenly no longer had my DOS able to multitask in a visual environment with all these features, and rather had to challenge myself with freeing up 600 KB of conventional RAM...
Wut?
BCPL: 1967
C: 1975
Amiga: 1985
It includes all the new features that have differentiated C from B, most of which have been implemented during the summer of 1973. Therefore, by January 1974 C was complete.
The next significant modifications of the language after that date have occurred only during the ANSI standardization process (which ended in 1989, so perhaps the poster above has meant that Amiga happened between K&R C and ANSI C).
Only the Amiga's disk operating system and command-line shell were from TRIPOS. The underlying "Exec" (microkernel) had been developed at Commodore-Amiga: It was close enough to similar facilities in TRIPOS that it made porting relatively simple.
Commodore-Amiga had originally hired another company to write the DOS, called "CAOS" (Commodore Amiga Operating System), originally intended to have been even more similar to Unix than TRIPOS was. But that company had failed to deliver, and the release date was fast approaching, so the choice of TRIPOS was an emergency solution.
"Although the first edition of K&R described most of the rules that brought C's type structure to its present form, many programs written in the older, more relaxed style persisted, and so did compilers that tolerated it. To encourage people to pay more attention to the official language rules, to detect legal but suspicious constructions, and to help find interface mismatches undetectable with simple mechanisms for separate compilation, Steve Johnson adapted his pcc compiler to produce lint [Johnson 79b], which scanned a set of files and remarked on dubious constructions."
Random dude on Internet, I know better.
(void) var;
for unused variables is specifically to silence certain versions of lint which would otherwise complain.https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2510.pdf
(although some C compilers already allowed it in non-pedantic mode)
But of all those options, "(void)bla;" might actually be the least clutter (and at the same time the most compatible).
static void unused_(int x, ...) { (void)x; }
#define unused(...) unused_(0, __VA_ARGS__)
This way you can just have one `unused(foo,bar,baz,quux);` line at the top of the function listing all unused parameters.A real classic!