[Bug preprocessor/26857] New: Warning for absolute or dotted header paths
Given that some build systems try to encapsulate system headers separately from those found in /usr/include, primarily through careful arrangement of -I flags, it would be helpful if there was a warning flag, let's call it -Wstrict-header-path for now, which would signal when a source file tries to do the following: #include "/usr/include/sys/stat.h" #include "../../../sys/stat.h" Ian Lance Taylor has indicated to me that this could be done as a check on fname in do_include_common in libcpp/directives.c. I would be willing to attempt a patch myself if this enhancement is accepted. -- Summary: Warning for absolute or dotted header paths Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mbland at google dot com GCC build triplet: N/A GCC host triplet: N/A GCC target triplet: N/A http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26857
[Bug preprocessor/26857] Warning for absolute or dotted header paths
--- Comment #1 from mbland at google dot com 2006-03-27 19:25 --- I've got a working patch for 4.1.0, including a test case, reviewed by Ian Lance Taylor. As soon as "our people" can work out an agreement with "your people" over copyright assignment, I'll be sure to post it to this PR. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26857
[Bug preprocessor/26857] Warning for absolute or dotted header paths
--- Comment #3 from mbland at google dot com 2006-03-30 21:09 --- Right, I've got a mainline patch now, too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26857
[Bug preprocessor/26857] Warning for absolute or dotted header paths
--- Comment #5 from mbland at google dot com 2007-01-08 19:58 --- Subject: Re: Warning for absolute or dotted header paths On 8 Jan 2007 19:53:06 -, tromey at gcc dot gnu dot org <[EMAIL PROTECTED]> wrote: > > > --- Comment #4 from tromey at gcc dot gnu dot org 2007-01-08 19:53 > --- > What's the status of this? > The Google assignment situation has been resolved, so I think > the patch submission can move forward... This has been in the back of my mind... I'll get it ready soon. Mike -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26857