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]
Other format: [Raw text]

Re: -MM, 2.95 vs 3.0

Nathan Sidwell wrote:-

> No. the difference between <> and "" is *only* that "" first looks relative to
> the directory containing the including file, before using the include search path.
> Both <> and "" start at the begining of the include search path. You should
> use "" if you want to locate the included file relative to the including file.
> If the included file could be anywhere, use <>.

Actually, it's not quite that simple.  See the documentation for -I-.
But what you say is basically the idea.

It's also worth point out here that <> and "" are distinct (in 3.1) *only*
in their file lookup semantics.  It does not affect whether CPP believes
a given header to be a "system header".  That is decided purely based
upon the directory in which the header was found (and anything included
by a system header is deemed to be a system header).

> What you really want is a way of indicating that a header is a 'library'
> header, rather than a 'user' header. The system header file distinction
> is inadequate.
> What about
> 	#pragma GCC library_header

Hmm, is that just before including the header?  Where does its scope
end?  Or is it in the header (it's a third-party header, remember)?

> ? Its presence would cause the dependency graph to be terminated at this
> header file. So that you could generate dependencies when developing the
> library, you'd use something like
> 	#pragma GCC library_header
> 	#endif
> (Neil, do you think something like this would fly? It strikes me as a more
> meaningful distinction for dependencies.)

I don't know since I don't understand your proposed semantics.  I'd
rather avoid another pragma if possible, but that's a fairly minor


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