From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20556 invoked by alias); 9 May 2008 23:03:34 -0000 Received: (qmail 20368 invoked by uid 48); 9 May 2008 23:02:50 -0000 Date: Fri, 09 May 2008 23:03:00 -0000 Message-ID: <20080509230250.20367.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug preprocessor/28435] -MMD vs not found system header (included from a system header) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tromey at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg00770.txt.bz2 ------- Comment #6 from tromey at gcc dot gnu dot org 2008-05-09 23:02 ------- I think we should give an error by default, and only *not* give an error if -MG is passed. My reasoning is that -MG exists only to disable this error. I couldn't think of a reason to disable it in other cases. For instance, it seems to me that "gcc -E" should fail if a header is missing. I looked at open_file_failed, but I don't understand the reasoning behind a lot of the logic in there (though see PR 15220). A comment says: /* If we are outputting dependencies but not for this file then don't error because we can still produce correct output. */ ... but this seems to be based on incorrect logic to me. A <> include may define something which affects later inclusions. I wonder if anybody relies on the current, bogus, behavior. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435