bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] parse-datetime: avoid "%pure-parser" deprecation warning from Bi


From: Bernhard Voelker
Subject: [PATCH] parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
Date: Fri, 19 Jul 2019 01:17:25 +0200

* lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
"%pure-parser".  The former is available since Bison 2.3b (2008, [1]),
while the latter is marked as obsolete since version 3.4 (May 2019, [2]):

  ./lib/parse-datetime.y:568.1-12: warning: deprecated directive, \
    use '%define api.pure' [-Wdeprecated]
  568 | %pure-parser
      | ^~~~~~~~~~~~

[1] https://git.sv.gnu.org/cgit/bison.git/commit/?id=d9df47b656fd
[2] https://git.sv.gnu.org/cgit/bison.git/commit/?id=de5207244b5c
---
 ChangeLog            | 7 +++++++
 lib/parse-datetime.y | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 08bcf1082..2f427010f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-07-19  Bernhard Voelker  <address@hidden>
+
+       parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
+       * lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
+       "%pure-parser".  The former is available since Bison 2.3b (2008),
+       while the latter is marked as obsolete since version 3.4 (May 2019).
+
 2019-07-16  Bruno Haible  <address@hidden>
 
        update-copyright: Make it work again (regression from 2019-06-15).
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index b264bb7fb..780575919 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -565,7 +565,7 @@ debug_print_relative_time (char const *item, parser_control 
const *pc)
 
 /* We want a reentrant parser, even if the TZ manipulation and the calls to
    localtime and gmtime are not reentrant.  */
-%pure-parser
+%define api.pure
 %parse-param { parser_control *pc }
 %lex-param { parser_control *pc }
 
-- 
2.22.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]