aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-10-07 16:13:22 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-10-07 16:13:22 +0000
commit7c02f68bf452748cb331668cbb8116817b136ea0 (patch)
tree6da35a78a8c684e952244e9c639aa507f3c11a0a /gcc/fortran/options.c
parent96f6e029ed166111d1178f29e7ab63f78f044554 (diff)
downloadgcc-7c02f68bf452748cb331668cbb8116817b136ea0.zip
gcc-7c02f68bf452748cb331668cbb8116817b136ea0.tar.gz
gcc-7c02f68bf452748cb331668cbb8116817b136ea0.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/fortran/ChangeLog: 2014-10-06 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 PR fortran/54687 * gfortran.h (gfc_warning_cmdline): Add overload that takes an option. (gfc_error_cmdline): Declare. * error.c (gfc_warning_cmdline): New overload that takes an option. (gfc_error_cmdline): New. * lang.opt (Wmissing-include-dirs): New. * scanner.c (add_path_to_list): Use the new functions. (load_file): Likewise. * options.c (gfc_init_options): Wmissing-include-dirs is enabled by default in Fortran. (gfc_handle_option): Accept automatically handled options. From-SVN: r215974
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 6543fbd..a482d2f 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -172,6 +172,12 @@ gfc_init_options (unsigned int decoded_options_count,
gfc_option.rtcheck = 0;
gfc_option.coarray = GFC_FCOARRAY_NONE;
+ /* ??? Wmissing-include-dirs is disabled by default in C/C++ but
+ enabled by default in Fortran. Ideally, we should express this
+ in .opt, but that is not supported yet. */
+ if (!global_options_set.x_cpp_warn_missing_include_dirs)
+ global_options.x_cpp_warn_missing_include_dirs = 1;;
+
set_default_std_flags ();
/* Initialize cpp-related options. */
@@ -634,6 +640,8 @@ gfc_handle_option (size_t scode, const char *arg, int value,
switch (code)
{
default:
+ if (cl_options[code].flags & gfc_option_lang_mask ())
+ break;
result = false;
break;