[TUHS] So now that the source is finally out...

norman at nose.cs.utoronto.ca norman at nose.cs.utoronto.ca
Mon Jan 28 05:03:40 AEST 2002

Ken Wellsch:

  I'm fairly sure things like "=+" and so on were replaced with "+="
  in the move from V6 to V7.  I think structure assignments were added
  here too, and the much more obscure, being able to declare passed
  arguments in the function preamble as "register."  I believe K&R
  reflects the C language as seen with V7...

The V7 C compiler accepted =+, but it still accepted += as well; there was
a lot of code written the old way, and nobody wanted to be forced to convert
everything all at once.  Similarly, the V7 compiler complained about implicit
conversions between pointers of different types, or between ints and pointers,
but they were treated as warnings, not fatal errors; you could still compile
old code and just ignore the compiler's fussing.

I recall that when I arrived at Bell Labs in 1984, it was apparently not long
after the research group's C compiler had been changed to treat all the
obsolete stuff as errors; certainly there was still code in /usr/src that
hadn't been updated, and all of it had been recompiled recently to run on
the VAX.

A modern C compiler would choke even on some of the stuff that was legal
in those days.  Recently I recompiled tbl with lcc, and had a grand time
cleaning out all the ideas we all thought were clever in the late 1970s
but most of us would never think of doing now.  For those with the virgin
source handy, take a look at subroutine `point' and the way it is used
and abused.

Norman Wilson

More information about the TUHS mailing list