declarations in include files: how do YOU feel?

Norman Diamond diamond at diamond.csl.sony.junet
Fri May 12 19:46:07 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?

Yes.

>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?

In K&R-I and ANSI and any non-broken compiler, it is specifically
permitted.  (Although K&R-I indirectly contradicts itself on this
point, it directly states that this is permitted.)

--
Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp at relay.cs.net)
  The above opinions are my own.   |  Why are programmers criticized for
  If they're also your opinions,   |  re-implementing the wheel, when car
  you're infringing my copyright.  |  manufacturers are praised for it?



More information about the Comp.lang.c mailing list