aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index cd254e9..f7bbd7f 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -52,11 +52,13 @@ set_default_std_flags (void)
static void
set_dec_flags (int 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);
-
+ if (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 other DEC compatibility extensions. */
flag_dollar_ok |= value;