Blob Blame History Raw
From f50b0452c10d514860e08e1ea091b17aa97d6a90 Mon Sep 17 00:00:00 2001
From: Jim MacArthur <jim.macarthur@codethink.co.uk>
Date: Thu, 4 Feb 2016 16:59:41 +0000
Subject: [PATCH 06/23] Allow blank format items in format strings

This has to be written in a slightly verbose manner because GCC 7
defaults to building with -Werror=implicit-fallthrough which prevents
us from just falling through to the default: case.

This feature is enabled by the `-std=extra-legacy` compiler flag.
---
        0006-Allow-blank-format-items-in-format-strings.patch

diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index b2fa741..aa3443f 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -752,6 +752,16 @@ format_item_1:
       error = unexpected_end;
       goto syntax;
 
+    case FMT_RPAREN:
+      /* Oracle allows a blank format item. */
+      if (gfc_option.allow_std & GFC_STD_EXTRA_LEGACY)
+        goto finished;
+      else
+	{
+	  error = unexpected_element;
+	  goto syntax;
+	}
+
     default:
       error = unexpected_element;
       goto syntax;