options.c (set_dec_flags): Only set legacy standards when value is not zero.
authorFritz Reese <fritzoreese@gmail.com>
Thu, 10 Aug 2017 12:52:01 +0000 (12:52 +0000)
committerFritz Reese <foreese@gcc.gnu.org>
Thu, 10 Aug 2017 12:52:01 +0000 (12:52 +0000)
2017-08-10  Fritz Reese <fritzoreese@gmail.com>

    gcc/fortran/ChangeLog:

* options.c (set_dec_flags): Only set legacy standards when value
is not zero.

From-SVN: r251025

gcc/fortran/ChangeLog
gcc/fortran/options.c

index 20fa93f..50f2f04 100644 (file)
@@ -1,5 +1,10 @@
 2017-08-10  Fritz Reese <fritzoreese@gmail.com>
 
+       * options.c (set_dec_flags): Only set legacy standards when value
+       is not zero.
+
+2017-08-10  Fritz Reese <fritzoreese@gmail.com>
+
        * options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
        with -fdec when not set by user.
 
index cd254e9..f7bbd7f 100644 (file)
@@ -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;