back
2 comments
> i've also been reading the c89 rationale document, and the source code for the 7th edition unix c compiler.

> the original c compiler was a single-pass compiler.

No it was not. It was a two-pass compiler.

> that was a necessity for a heavily memory-constrainted system like the ones they were working with.

Again, no. In fact, the compiler had two passes because of the memory constraints: it was impossible to fit the code (and the working data) for both passes into memory, so it was split, and the passes communicated by the way of temporary disk files. The same thing is true for the UNIX's as(1) assembler, it also had two passes.

There were also things that were an artefact of the compiler but not in the standard. For example there was no per-struct namespace, struct fields as handled internally by the compiler had a '.' in front of them which denoted them as being inside a struct, but not which struct they were inside, so you couldn't have an a.length and also a b.length.