aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorJoost VandeVondele <vondele@gcc.gnu.org>2014-08-22 10:14:50 +0000
committerJoost VandeVondele <vondele@gcc.gnu.org>2014-08-22 10:14:50 +0000
commit7e114fadf1ac83f36b1b84c60045ba016c4f37fa (patch)
treee461b437e15bff0158a42c3f3887302a848895db /gcc/fortran/options.c
parent3616dc706e703902088fcf055af5da7d410ea18f (diff)
downloadgcc-7e114fadf1ac83f36b1b84c60045ba016c4f37fa.zip
gcc-7e114fadf1ac83f36b1b84c60045ba016c4f37fa.tar.gz
gcc-7e114fadf1ac83f36b1b84c60045ba016c4f37fa.tar.bz2
re PR fortran/61234 (Warn for use-stmt without explicit only-list.)
2014-08-22 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch> * gfortran.dg/use_without_only_1.f90: New test. 2014-08-22 Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch> PR fortran/61234 * lang.opt (Wuse-without-only): New flag. * gfortran.h (gfc_option_t): Add it. * invoke.texi: Document it. * module.c (gfc_use_module): Warn if needed. * options.c (gfc_init_options,gfc_handle_option): Init accordingly. From-SVN: r214311
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 2f4338e..d648e94 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -107,6 +107,7 @@ gfc_init_options (unsigned int decoded_options_count,
gfc_option.warn_tabs = 1;
gfc_option.warn_underflow = 1;
gfc_option.warn_intrinsic_shadow = 0;
+ gfc_option.warn_use_without_only = 0;
gfc_option.warn_intrinsics_std = 0;
gfc_option.warn_align_commons = 1;
gfc_option.warn_real_q_constant = 0;
@@ -728,6 +729,10 @@ gfc_handle_option (size_t scode, const char *arg, int value,
gfc_option.warn_intrinsic_shadow = value;
break;
+ case OPT_Wuse_without_only:
+ gfc_option.warn_use_without_only = value;
+ break;
+
case OPT_Walign_commons:
gfc_option.warn_align_commons = value;
break;