Skip to content

Commit

Permalink
Fix [54a305cb88] (second part) by hand-editing tclDate.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Nov 10, 2023
1 parent aaf72b9 commit 67b84b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions generic/tclDate.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#define yylex TclDatelex
#define yyerror TclDateerror
#define yydebug TclDatedebug
#define yynerrs TclDatenerrs


/* Copy the first part of user declarations. */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2099,7 +2094,6 @@ YYLTYPE yylloc = yyloc_default;
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (&yylloc, info, YY_("syntax error"));
#else
Expand Down
2 changes: 2 additions & 0 deletions unix/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 67b84b7

Please sign in to comment.