From d1df696512de0654f52ebd28880683c9e58eac94 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@fb.com>
Date: Sun, 24 Jun 2018 20:47:58 -0700
Subject: [PATCH] parse-datetime: accommodate gcc-4.8.5

Bruno Haible reported the build failure in
https://lists.gnu.org/r/bug-gnulib/2018-06/msg00066.html
* lib/parse-datetime.y (parse_datetime2): Remove leading "static"
on declaration of new local.
---
 ChangeLog            | 6 ++++++
 lib/parse-datetime.y | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 3890bcadc..3a2045958 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-06-24  Jim Meyering  <meyering@fb.com>

+	parse-datetime: accommodate gcc-4.8.5
+	Bruno Haible reported the build failure in
+	https://lists.gnu.org/r/bug-gnulib/2018-06/msg00066.html
+	* lib/parse-datetime.y (parse_datetime2): Remove leading "static"
+	on declaration of new local.
+
 	canon-host: take GCC9's advice rather than ignoring warning
 	Pádraig Brady suggested not to ignore this GCC9 advice.
 	* lib/canon-host.c: Undo preceding change.
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index 3d8666a4d..00ecb7fca 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -1769,7 +1769,7 @@ parse_datetime2 (struct timespec *result, char const *p,
   /* Store a local copy prior to first "goto".  Without this, a prior use
      below of RELATIVE_TIME_0 on the RHS might translate to an assignment-
      to-temporary, which would trigger a -Wjump-misses-init warning.  */
-  static const relative_time rel_time_0 = RELATIVE_TIME_0;
+  const relative_time rel_time_0 = RELATIVE_TIME_0;

   if (strncmp (p, "TZ=\"", 4) == 0)
     {
-- 
2.18.0

