3 ms·
The original C compiler had no need for headers or function prototypes/forward declarations. Of course, it also was not a single-pass compiler: it had two (and
by Joker_vD 1y ago
The original C compiler had no need for headers or function prototypes/forward declarations. Of course, it also was not a single-pass compiler: it had two (and a half) passes and generated assembly that would then be assembled by a two-pass assembler.
- fuzztester 1y agoYes, function prototypes were introduced in the first ANSI version of C, IIRC, which came some years after the original C. The prototype feature was described in the second version of the classic K&R C book, The C Programming Language.
- pjmlp 1y agoFunction prototypes came to ANSI/ISO C via the ongoing work on ISO C++.
- fuzztester 1y agoDoesn't matter where it came from - in the context of my previous comment. I was talking w.r.t. the earlier version of C, and not in connection with C++.
- pjmlp 1y agoIt does from historical purposes, how the C standard came to be, what are the decisions that turned K&R C into C89.
- fuzztester 1y agoOkay, I get it now.