changeset 39436:5ec5e8338ba0

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.
author Jim Meyering <meyering@fb.com>
date Sun, 24 Jun 2018 20:47:58 -0700
parents aeb34181f3f6
children 1bf3fb1486ab
files ChangeLog lib/parse-datetime.y
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jun 25 04:18:30 2018 +0200
+++ b/ChangeLog	Sun Jun 24 20:47:58 2018 -0700
@@ -1,3 +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.
+
 2018-06-24  Bruno Haible  <bruno@clisp.org>
 
 	af_alg: Fail in continuable manner on Linux/powerpc64le.
--- a/lib/parse-datetime.y	Mon Jun 25 04:18:30 2018 +0200
+++ b/lib/parse-datetime.y	Sun Jun 24 20:47:58 2018 -0700
@@ -1769,7 +1769,7 @@
   /* 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)
     {