From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1623 invoked by alias); 24 Mar 2006 23:33:42 -0000 Received: (qmail 1603 invoked by uid 48); 24 Mar 2006 23:33:40 -0000 Date: Fri, 24 Mar 2006 23:33:00 -0000 Subject: [Bug preprocessor/26857] New: Warning for absolute or dotted header paths X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mbland at google dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg02496.txt.bz2 List-Id: 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