declarations in include files: how do YOU feel?
andre
andre at targon.UUCP
Fri May 12 21:26:13 AEST 1989
In article <180 at larry.sal.wisc.edu> jwp at larry.sal.wisc.edu.UUCP (Jeffrey W Percival) writes:
>Another question on this style: does one include lib.h in the
>subroutine files that make up lib.a? That is, if lib.h contains
>an "extern char foo()" and foo.c includes lib.h and then goes
>on to define foo, is this a problem?
No problem, it is just what you want, if the global prototype is used
in the file where the function is defined, the compiler will complain
when the prototype and the definition mismatch, thus by including lib.h
in the lib.a modules you let the compiler check all your prototypes for you.
--
~----~ |m AAA DDDD It's not the kill, but the thrill of the chase.
~|d1|~@-- AA AAvv vvDD DD Segment registers are for worms.
~----~ & AAAAAAAvv vvDD DD
~~~~~~ -- AAA AAAvvvDDDDDD Andre van Dalen, uunet!mcvax!targon!andre
More information about the Comp.lang.c
mailing list