re PR preprocessor/51303 (-Wmissing-include-dirs warnings reported as [enabled by default])
gcc/ChangeLog: 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org> PR preprocessor/51303 * incpath.c (remove_duplicates): Use cpp_warning. gcc/c-family/ChangeLog: 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org> PR preprocessor/51303 * c-common.c (struct reason_option_codes_t option_codes): Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically. gcc/testsuite/ChangeLog: 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org> PR preprocessor/51303 * gcc.dg/cpp/Wmissingdirs.c: Test for the warning option. From-SVN: r214201
This commit is contained in:
parent
43f9a13cee
commit
b44135942e
|
@ -1,3 +1,8 @@
|
|||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR preprocessor/51303
|
||||
* incpath.c (remove_duplicates): Use cpp_warning.
|
||||
|
||||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/60975
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR preprocessor/51303
|
||||
* c-common.c (struct reason_option_codes_t option_codes):
|
||||
Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
|
||||
|
||||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/60975
|
||||
|
|
|
@ -9680,23 +9680,24 @@ struct reason_option_codes_t
|
|||
};
|
||||
|
||||
static const struct reason_option_codes_t option_codes[] = {
|
||||
{CPP_W_DEPRECATED, OPT_Wdeprecated},
|
||||
{CPP_W_COMMENTS, OPT_Wcomment},
|
||||
{CPP_W_TRIGRAPHS, OPT_Wtrigraphs},
|
||||
{CPP_W_MULTICHAR, OPT_Wmultichar},
|
||||
{CPP_W_TRADITIONAL, OPT_Wtraditional},
|
||||
{CPP_W_LONG_LONG, OPT_Wlong_long},
|
||||
{CPP_W_ENDIF_LABELS, OPT_Wendif_labels},
|
||||
{CPP_W_VARIADIC_MACROS, OPT_Wvariadic_macros},
|
||||
{CPP_W_BUILTIN_MACRO_REDEFINED, OPT_Wbuiltin_macro_redefined},
|
||||
{CPP_W_COMMENTS, OPT_Wcomment},
|
||||
{CPP_W_CXX_OPERATOR_NAMES, OPT_Wc___compat},
|
||||
{CPP_W_DATE_TIME, OPT_Wdate_time},
|
||||
{CPP_W_DEPRECATED, OPT_Wdeprecated},
|
||||
{CPP_W_ENDIF_LABELS, OPT_Wendif_labels},
|
||||
{CPP_W_INVALID_PCH, OPT_Winvalid_pch},
|
||||
{CPP_W_LITERAL_SUFFIX, OPT_Wliteral_suffix},
|
||||
{CPP_W_LONG_LONG, OPT_Wlong_long},
|
||||
{CPP_W_MISSING_INCLUDE_DIRS, OPT_Wmissing_include_dirs},
|
||||
{CPP_W_MULTICHAR, OPT_Wmultichar},
|
||||
{CPP_W_NORMALIZE, OPT_Wnormalized_},
|
||||
{CPP_W_TRADITIONAL, OPT_Wtraditional},
|
||||
{CPP_W_TRIGRAPHS, OPT_Wtrigraphs},
|
||||
{CPP_W_UNDEF, OPT_Wundef},
|
||||
{CPP_W_UNUSED_MACROS, OPT_Wunused_macros},
|
||||
{CPP_W_CXX_OPERATOR_NAMES, OPT_Wc___compat},
|
||||
{CPP_W_NORMALIZE, OPT_Wnormalized_},
|
||||
{CPP_W_INVALID_PCH, OPT_Winvalid_pch},
|
||||
{CPP_W_VARIADIC_MACROS, OPT_Wvariadic_macros},
|
||||
{CPP_W_WARNING_DIRECTIVE, OPT_Wcpp},
|
||||
{CPP_W_LITERAL_SUFFIX, OPT_Wliteral_suffix},
|
||||
{CPP_W_DATE_TIME, OPT_Wdate_time},
|
||||
{CPP_W_NONE, 0}
|
||||
};
|
||||
|
||||
|
|
|
@ -263,7 +263,8 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
|
|||
/* 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_warning (pfile, CPP_W_MISSING_INCLUDE_DIRS, "%s: %s",
|
||||
cur->name, xstrerror (errno));
|
||||
reason = REASON_NOENT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR preprocessor/51303
|
||||
* gcc.dg/cpp/Wmissingdirs.c: Test for the warning option.
|
||||
|
||||
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/60975
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
/* Test that -Wmissing-include-dirs issues a warning when a specified
|
||||
directory does not exist. Source Ben Elliston, 2004-05-13. */
|
||||
|
||||
/* { dg-warning "No such file or directory" "-Wmissing-include-dirs" { target *-*-* } 0 } */
|
||||
/* { dg-warning "No such file or directory.*Wmissing-include-dirs" "-Wmissing-include-dirs" { target *-*-* } 0 } */
|
||||
|
|
Loading…
Reference in New Issue