aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorFritz Reese <fritzoreese@gmail.com>2016-10-25 15:13:43 +0000
committerFritz Reese <foreese@gcc.gnu.org>2016-10-25 15:13:43 +0000
commitf6d17ecdaff0782c2114b18eb04c9be98ca1c7cf (patch)
treeee373133ab268f2af7fc6ac7c66e8ae15a7a5a8a /gcc/fortran/options.c
parent6ddefaa79f3014ce4e57a744e9e8c9222beaf18b (diff)
downloadgcc-f6d17ecdaff0782c2114b18eb04c9be98ca1c7cf.zip
gcc-f6d17ecdaff0782c2114b18eb04c9be98ca1c7cf.tar.gz
gcc-f6d17ecdaff0782c2114b18eb04c9be98ca1c7cf.tar.bz2
Cleanup -fdec.
gcc/fortran/ * invoke.texi, gfortran.texi: Touch up documentation of -fdec. * gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option. * decl.c (match_record_decl, gfc_match_decl_type_spec, gfc_match_structure_decl): Ditto. * match.c (gfc_match_member_sep): Ditto. * options.c (gfc_handle_option): Ditto. * lang.opt (fdec-structure): Use Fortran Var for flag_dec_structure. * lang.opt (fdec): Use Fortran Var to create flag_dec. * options.c (set_dec_flags): With -fdec enable -fcray-pointer, -fd-lines-as-comments (default), -fdollar-ok, and legacy std flags. From-SVN: r241516
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 93403f7..2b90654 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -47,15 +47,27 @@ set_default_std_flags (void)
}
-/* Set all the DEC extension flags. */
+/* Set all the DEC extension flags. */
static void
set_dec_flags (int value)
{
- gfc_option.flag_dec_structure = value;
- flag_dec_intrinsic_ints = value;
- flag_dec_static = value;
- flag_dec_math = value;
+ /* Allow legacy code without warnings. */
+ gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL
+ | GFC_STD_GNU | GFC_STD_LEGACY;
+ gfc_option.warn_std &= ~(GFC_STD_LEGACY | GFC_STD_F95_DEL);
+
+ /* Set -fd-lines-as-comments by default. */
+ if (value && gfc_current_form != FORM_FREE && gfc_option.flag_d_lines == -1)
+ gfc_option.flag_d_lines = 0;
+
+ /* Set other DEC compatibility extensions. */
+ flag_dollar_ok |= value;
+ flag_cray_pointer |= value;
+ flag_dec_structure |= value;
+ flag_dec_intrinsic_ints |= value;
+ flag_dec_static |= value;
+ flag_dec_math |= value;
}
@@ -729,7 +741,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_fdec_structure:
- gfc_option.flag_dec_structure = 1;
+ flag_dec_structure = 1;
break;
}