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 20fa93f6ec9410f7e8d5c88a1225721016d04a97..50f2f0449085d6efe5d27228ffb6b6fe41a3af7b 100644 (file)
@@ -1,3 +1,8 @@
+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
index cd254e932296555f242f953468d0556c3bbf1da2..f7bbd7f2cde5c2ec277bba4ea9fe5ecf4c318271 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;