aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/cpp.h
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2021-09-21 08:27:00 +0200
committerTobias Burnus <tobias@codesourcery.com>2021-09-21 08:28:30 +0200
commit417ea5c02cef7f000e66d1af22b066c2c1cda047 (patch)
tree1212ed64ad39e507f11d767384a56c08136a7d36 /gcc/fortran/cpp.h
parent63c6446f77b9001d26f973114450d790749f282b (diff)
downloadgcc-417ea5c02cef7f000e66d1af22b066c2c1cda047.zip
gcc-417ea5c02cef7f000e66d1af22b066c2c1cda047.tar.gz
gcc-417ea5c02cef7f000e66d1af22b066c2c1cda047.tar.bz2
Fortran: Fix -Wno-missing-include-dirs handling [PR55534]
gcc/fortran/ChangeLog: PR fortran/55534 * cpp.c: Define GCC_C_COMMON_C for #include "options.h" to make cpp_reason_option_codes available. (gfc_cpp_register_include_paths): Make static, set pfile's warn_missing_include_dirs and move before caller. (gfc_cpp_init_cb): New, cb code moved from ... (gfc_cpp_init_0): ... here. (gfc_cpp_post_options): Call gfc_cpp_init_cb. (cb_cpp_diagnostic_cpp_option): New. As implemented in c-family to match CppReason flags to -W... names. (cb_cpp_diagnostic): Use it to replace single special case. * cpp.h (gfc_cpp_register_include_paths): Remove as now static. * gfortran.h (gfc_check_include_dirs): New prototype. (gfc_add_include_path): Add new bool arg. * options.c (gfc_init_options): Don't set -Wmissing-include-dirs. (gfc_post_options): Set it here after commandline processing. Call gfc_add_include_path with defer_warn=false. (gfc_handle_option): Call it with defer_warn=true. * scanner.c (gfc_do_check_include_dir, gfc_do_check_include_dirs, gfc_check_include_dirs): New. Diagnostic moved from ... (add_path_to_list): ... here, which came before cmdline processing. Take additional bool defer_warn argument. (gfc_add_include_path): Take additional defer_warn arg. * scanner.h (struct gfc_directorylist): Reorder for alignment issues, add new 'bool warn'. libgfortran/ChangeLog: PR fortran/55534 * configure.ac (AM_FCFLAGS): Add -Wno-missing-include-dirs. * configure: Regenerate. libgomp/ChangeLog: PR fortran/55534 * testsuite/libgomp.fortran/fortran.exp: Add -Wno-missing-include-dirs to ALWAYS_CFLAGS. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/include_6.f90: Change dg-error to dg-warning and update pattern. * gfortran.dg/include_14.f90: New test. * gfortran.dg/include_15.f90: New test. * gfortran.dg/include_16.f90: New test. * gfortran.dg/include_17.f90: New test. * gfortran.dg/include_18.f90: New test. * gfortran.dg/include_19.f90: New test. * gfortran.dg/include_20.f90: New test. * gfortran.dg/include_21.f90: New test.
Diffstat (limited to 'gcc/fortran/cpp.h')
-rw-r--r--gcc/fortran/cpp.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/fortran/cpp.h b/gcc/fortran/cpp.h
index f642c77..5cb7e5a 100644
--- a/gcc/fortran/cpp.h
+++ b/gcc/fortran/cpp.h
@@ -50,6 +50,4 @@ void gfc_cpp_done (void);
void gfc_cpp_add_include_path (char *path, bool user_supplied);
void gfc_cpp_add_include_path_after (char *path, bool user_supplied);
-void gfc_cpp_register_include_paths (void);
-
#endif /* GFC_CPP_H */