From 67b84b71c66b45cb139546c2a7e3aec964a5d4c6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Nov 2023 14:22:06 +0000 Subject: Fix [54a305cb88] (second part) by hand-editing tclDate.c. --- generic/tclDate.c | 6 ------ unix/Makefile.in | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/generic/tclDate.c b/generic/tclDate.c index ebe499d..fa27475 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -64,7 +64,6 @@ #define yylex TclDatelex #define yyerror TclDateerror #define yydebug TclDatedebug -#define yynerrs TclDatenerrs /* Copy the first part of user declarations. */ @@ -1295,9 +1294,6 @@ static YYLTYPE yyloc_default ; YYLTYPE yylloc = yyloc_default; - /* Number of syntax errors so far. */ - int yynerrs; - int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1361,7 +1357,6 @@ YYLTYPE yylloc = yyloc_default; yystate = 0; yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; @@ -2099,7 +2094,6 @@ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { - ++yynerrs; #if ! YYERROR_VERBOSE yyerror (&yylloc, info, YY_("syntax error")); #else diff --git a/unix/Makefile.in b/unix/Makefile.in index 39965cf..9267ef7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -1919,6 +1919,8 @@ dist-packages: configure-packages # the name of the .y file so that make doesn't try to automatically regenerate # the .c file. +# +# Remark: see [54a305cb88]. tclDate.c is manually edited, removing the unused "yynerrs" variable gendate: bison --output-file=$(GENERIC_DIR)/tclDate.c \ --no-lines \ -- cgit v0.12