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: "matz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2006 14:04:37 -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 #5 from matz at gcc dot gnu dot org 2006-10-18 14:04 -------
The problem is in libcpp/files.c:open_file_failed. It deliberately only
gives a warning when producing dependencies (and under some circumstances
doesn't even give a warning) for missing files. I think it does that under
the assumption that the user gave only -M (with -E implied), so he would
be interested in the preprocessor output nevertheless, and that can be
produced even with missing deps. The problem is, that giving -MD or -MMD
does not imply -E, i.e. the user really wants the deps to just be a
side-effect, as documented. Probably libcpp needs another option which can
be set from the driver, which would make it produce errors instead of
warnings.
--
matz at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435