|
|
3db796 |
From d1bb76287ec58fdde7ced70088559136555bd7bd Mon Sep 17 00:00:00 2001
|
|
|
3db796 |
From: Jim MacArthur <jim.macarthur@codethink.co.uk>
|
|
|
3db796 |
Date: Fri, 11 Dec 2015 17:04:09 +0000
|
|
|
3db796 |
Subject: [PATCH 03/23] Add -std=extra-legacy
|
|
|
3db796 |
|
|
|
3db796 |
|
|
|
3db796 |
0003-Add-std-extra-legacy.patch
|
|
|
3db796 |
|
|
|
3db796 |
0023-Add-a-full-stop-to-the-std-extra-legacy-help-text.patch
|
|
|
3db796 |
|
|
|
3db796 |
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
|
|
|
3db796 |
index 4421ce4..4808c27 100644
|
|
|
3db796 |
--- a/gcc/fortran/lang.opt
|
|
|
3db796 |
+++ b/gcc/fortran/lang.opt
|
|
|
3db796 |
@@ -790,6 +790,10 @@ std=legacy
|
|
|
3db796 |
Fortran
|
|
|
3db796 |
Accept extensions to support legacy code.
|
|
|
3db796 |
|
|
|
3db796 |
+std=extra-legacy
|
|
|
3db796 |
+Fortran
|
|
|
3db796 |
+Accept even more legacy extensions, including things disallowed in f90.
|
|
|
3db796 |
+
|
|
|
3db796 |
undef
|
|
|
3db796 |
Fortran
|
|
|
3db796 |
; Documented in C
|
|
|
3db796 |
diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h
|
|
|
3db796 |
index c5ff992..dcc923b 100644
|
|
|
3db796 |
--- a/gcc/fortran/libgfortran.h
|
|
|
3db796 |
+++ b/gcc/fortran/libgfortran.h
|
|
|
3db796 |
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
|
|
|
3db796 |
gfortran.texi. */
|
|
|
3db796 |
/* For now, use F2015 = GFC_STD_GNU. */
|
|
|
3db796 |
#define GFC_STD_F2015 (1<<5) /* PLACEHOLDER for Fortran 2015. */
|
|
|
3db796 |
+#define GFC_STD_EXTRA_LEGACY (1<<10) /* Even more backward compatibility. */
|
|
|
3db796 |
#define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */
|
|
|
3db796 |
#define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
|
|
|
3db796 |
#define GFC_STD_F2008 (1<<7) /* New in F2008. */
|
|
|
3db796 |
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
|
|
|
3db796 |
index 1af76aa..9ebf8e3 100644
|
|
|
3db796 |
--- a/gcc/fortran/options.c
|
|
|
3db796 |
+++ b/gcc/fortran/options.c
|
|
|
3db796 |
@@ -733,6 +733,12 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|
|
3db796 |
gfc_option.warn_std = 0;
|
|
|
3db796 |
break;
|
|
|
3db796 |
|
|
|
3db796 |
+ case OPT_std_extra_legacy:
|
|
|
3db796 |
+ set_default_std_flags ();
|
|
|
3db796 |
+ gfc_option.warn_std = 0;
|
|
|
3db796 |
+ gfc_option.allow_std |= GFC_STD_EXTRA_LEGACY;
|
|
|
3db796 |
+ break;
|
|
|
3db796 |
+
|
|
|
3db796 |
case OPT_fshort_enums:
|
|
|
3db796 |
/* Handled in language-independent code. */
|
|
|
3db796 |
break;
|