May prototypes be required for lib functs

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Sep 8 03:17:41 AEST 1990


In article <1990Sep7.114544 at osf.org> dbrooks at osf.org (David Brooks) writes:
>This loses some of the benefits of prototypes.

Well, yes, but there was that mountain of already-written code that was
correct by previous (K&R) criteria that we wanted to "grandfather in".

>Build a library using prototypes and narrow parameters, ...

I don't recommend excessive use of narrow parameter types, but certainly
if you're going to use them (or even if not!) there should be an associated
header that properly declares them.  A conforming compiler will flag any
type error in the function implementation if the implementation includes
the header.  Otherwise, some form of "lint" should be used by the developer.



More information about the Comp.std.c mailing list