public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/26857]  New: Warning for absolute or dotted header paths
@ 2006-03-24 23:33 mbland at google dot com
  2006-03-27 19:25 ` [Bug preprocessor/26857] " mbland at google dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mbland at google dot com @ 2006-03-24 23:33 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-08 19:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-24 23:33 [Bug preprocessor/26857] New: Warning for absolute or dotted header paths mbland at google dot com
2006-03-27 19:25 ` [Bug preprocessor/26857] " mbland at google dot com
2006-03-30 20:12 ` pinskia at gcc dot gnu dot org
2006-03-30 21:09 ` mbland at google dot com
2007-01-08 19:53 ` tromey at gcc dot gnu dot org
2007-01-08 19:58 ` mbland at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).