This is the mail archive of the gcc-patches@gcc.gnu.org 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: PATCH: cpp include directory search order warning (mark 2)


John David Anglin wrote:
> 
> > 3) Zack's (yet to be written) patch will give you a search order
> > (that might be) different to what you asked for, but does fulfil the
> > spirit, in that the directory will be searched.
> 
> Here is a crack at implementing Zack's suggestion.  I didn't implement
> any warnings because, if the patch is correct, a -I option will never
> reorder the system include chain or cause a system include directory to
> be ignored.
I think you should get a warning (under -v or whatever), when this happens.
Although the set of directories searched is correct, the order in which
they are traversed might be 'surprising'. This kind of configuration
bug is a pain to track down without such feedback. (There may
be two different foolib headers in different directories, and dammit, why
does the compiler insist on picking up the 'later' one?)

Other than that, fine by me.

nathan
-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
           The voices in my head told me to say this
nathan@acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan@cs.bris.ac.uk


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