From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29427 invoked by alias); 3 May 2002 16:56:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29410 invoked by uid 71); 3 May 2002 16:56:03 -0000 Date: Fri, 03 May 2002 09:56:00 -0000 Message-ID: <20020503165603.29407.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Zack Weinberg Subject: Re: preprocessor/6521: -MG creates dependency with wrong path Reply-To: Zack Weinberg X-SW-Source: 2002-05/txt/msg00075.txt.bz2 List-Id: The following reply was made to PR preprocessor/6521; it has been noted by GNATS. From: Zack Weinberg To: Neil Booth Cc: rspier@pobox.com, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: preprocessor/6521: -MG creates dependency with wrong path Date: Fri, 3 May 2002 09:46:25 -0700 On Fri, May 03, 2002 at 01:54:10PM +0100, Neil Booth wrote: > rspier@pobox.com wrote:- > > > >Description: > > gcc or g++ -MG outputs incorrect dependency information when there is a nonexistent header file specified in angle brackets. (i.e. #include <...>) > > > > It uses the path of the first specified -I argument (or the first system directory, if no directory is specified.) > > > > The attached script demonstrates the problem. > > > > #include "some/header.h" > > #include > > int main() { > > } > > gcc3 -M -MG /tmp/_16336//test.c -I/tmp/_16336//not/a/real/path > > test.o: /tmp/_16336/test.c some/header.h \ > > /tmp/_16336/not/a/real/path/nonexistent.h > > >How-To-Repeat: > > (Run attached script.) > > This is intended behaviour (but undocumented I think); whether it is > desirable or not is a different question. > > IMO this is not worth fixing; and we should just document the behaviour > for <> headers. What do you think, Zack? Agreed. zw