+2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ * options.c (set_default_std_flags): New function to consolidate
+ setting the flags.
+ (gfc_init_options): Use new function.
+ (gfc_handle_option): Use new function.
+
2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
* gfortran.texi (Old-style kind specifications): Document
gfc_option_t gfc_option;
+/* Set flags that control warnings and errors for different
+ Fortran standards to their default values. */
+
+static void
+set_default_std_flags (void)
+{
+ gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
+ | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU
+ | GFC_STD_LEGACY;
+ gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY;
+}
+
/* Get ready for options handling. */
unsigned int
flag_errno_math = 0;
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
- | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU
- | GFC_STD_LEGACY;
- gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY;
+ set_default_std_flags ();
gfc_option.warn_nonstd_intrinsics = 0;
break;
case OPT_std_gnu:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
- | GFC_STD_F77 | GFC_STD_F95 | GFC_STD_F2003
- | GFC_STD_GNU | GFC_STD_LEGACY;
- gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
- | GFC_STD_LEGACY;
+ set_default_std_flags ();
break;
case OPT_std_legacy:
- gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
- | GFC_STD_F77 | GFC_STD_F95 | GFC_STD_F2003
- | GFC_STD_GNU | GFC_STD_LEGACY;
+ set_default_std_flags ();
gfc_option.warn_std = 0;
break;