On Mon, Jan 26, 2015, at 19:11, Steven D'Aprano wrote: > > (header files in the 1970s didn't even actually include function > > signature information) - which did not even participate in compilation > > at all. > > If C compilers didn't use the header files, what were they for?
My sentence may have been phrased in a confusing way. C compilers did use the header files, and the header files did not include _most_ function signature information (they only included the return type of functions whose return type was not int. Any function not declared was assumed to return int). Lint libraries did contain function signature information, and were not used for compilation (but rather only for running lint). The void type didn't exist either - a function with no declared return type could either return int or return nothing at all. A call site attempting to use the value of such a function would get whatever arbitrary value was in r0. Lint libraries also included return statements for such functions to determine if they returned values or not. Here is an example of a lint library: http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/lib/llib-lc Here is stdio.h from the same era. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/stdio.h Headers also would often not include function declarations even for functions that did have non-int return types. For example, time.h had no function declarations despite many of the time library functions returning pointers, it only contained the definition of struct tm. There was no stdlib.h at all - you were expected to declare e.g. "char *malloc();" yourself if you needed it. -- https://mail.python.org/mailman/listinfo/python-list