Gibson Pilconis <gibson...@protonmail.com> wrote:

> I'm working on a project that supports OpenBSD and I noticed that 
> pcidevs_data.h uses
> structures defined in pcireg.h but doesn't include the file. As a result, 
> pcireg.h has
> to be included before pcidevs_data.h or else the compiler will throw an 
> error. 
> 
> I'm not sure if this is considered a bug or not, but I couldn't find any 
> documentation
> of it and I could easily see it confusing newer developers. If adding an 
> include to
> the header isn't an option, perhaps adding in a comment informing developers 
> they need
> to import pcireg.h would prove useful.

Have you ever found a header file called everything.h?

Imagine if you would. You'd be able to do

        #include <everything.h>

and since everything.h would include everything, you would not need to specify
subsets of things you are interested in.

But that's not how the world works.  We very often intentionally require
manual includes of things before they are used.

Not trying to be argumentive.  It just Is How It Is.

Reply via email to