Subject: Re: includes question
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mmondor@gobot.ca>
List: tech-kern
Date: 11/09/2002 17:49:26
On Sat, Nov 09, 2002 at 11:21:42PM +0100, der Mouse wrote:
> That's a good example of the sort of thing I mean.
>
> If I use foo_t in my code, I should include the header <bar.h> that
> defines it, yes. But if I happen to use bleeble(), whose interface
> does not require me to know foo_t even exists, but bleeble() is
> declared in the same include file <fribble.h> as another call gringle()
> whose interface _does_ require its caller to know about foo_t, *then*
> should I have to include <bar.h>? I maintain I should not. Yet in far
> too many cases, <fribble.h> produces syntax errors if foo_t is not
> already defined.
I fully agree