This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpplib: what is a system header? [HEAD]

Neil Booth <> writes:

> This unifies and simplifies the tests for systemheaderness in cpplib.
> Currently, there are 2 tests, one for dependencies (-MM) and one for
> everything else.  The current ones work like this:

> o For dependencies, everything #included with <>, and nested includes
>   below that, are deemed system headers, regardless of where the headers
>   actually are found.


> The new rule for everything is

> o Something is deemed a system header if it was included by
>   a system header (via "" or <>), or if it was found in a
>   system header directory (with absolute pathnames never
>   giving a system header directory).

> This is a slight change in semantics, but for properly configured
> systems with code that correctly uses the <> and "" forms of #include,
> no changes should be noticed.  Zack and I want to try this for a while,
> and see if anyone complains.

Hm.  This is going to cause a change in behavior of make depend in at
least some packages (INN being the example near and dear to my heart).
We'd end up listing Perl header files and the like in the dependencies in
the Makefile after this change without further changing our scripts, since
those directories are added to the include path with -I (we support
compilers other than gcc).  Or am I missing something?

Russ Allbery (             <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]