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.