ANSI C prototypes
Dan Salomon
salomon at ccu.umanitoba.ca
Fri Nov 2 14:05:56 AEST 1990
In article <RJC.90Nov1145211 at brodie.uk.ac.ed.cstr> rjc at uk.ac.ed.cstr (Richard Caley) writes:
>In article <1906 at necisa.ho.necisa.oz> boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
>
> > Right on! The function prototypes are just stupid.
> > I shouldn't have to type:
> > extern gore *good(const char *vomit);
> > to get the functionality of type checking of function arguments.
> > The compiler and loader should do it.
>
> I want my errors when I compile things, not when some poor guy tries
> to use it.
>
You are both right. Repeatedly typing function prototypes is a tedious
waste of time, but we really would like type errors reported at compile
time.
A possible solution would be to have a utility for building libraries
of function prototypes from source code. The compiler could check
source code usage against usage in this library. The linker would have
to repeat the check to make sure that the prototype library didn't get
out of synch with the object library.
--
Dan Salomon -- salomon at ccu.UManitoba.CA
Dept. of Computer Science / University of Manitoba
Winnipeg, Manitoba, Canada R3T 2N2 / (204) 275-6682
More information about the Comp.lang.c
mailing list