This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/51303] -Wmissing-include-dirs warnings reported as [enabled by default]
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Nov 2011 14:35:48 +0000
- Subject: [Bug preprocessor/51303] -Wmissing-include-dirs warnings reported as [enabled by default]
- Auto-submitted: auto-generated
- References: <bug-51303-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51303
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-25
CC| |manu at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-11-25 14:35:48 UTC ---
Confirmed. The problem is in gcc/incpath.c
/* If -Wmissing-include-dirs is given, warn. */
cpp_options *opts = cpp_get_options (pfile);
if (opts->warn_missing_include_dirs && cur->user_supplied_p)
cpp_errno (pfile, CPP_DL_WARNING, cur->name);
cpp_errno is not designed to pass down the warning option. All cpp_errno using
CPP_DL_WARNING should use a new cpp_warnno modeled after cpp_warning that
passes down the appropriate reason (option) for the warning. I am sure there
are more cases of this.