This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2008 23:02:50 -0000
- Subject: [Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
- References: <bug-28435-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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