mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Merge branch 'origin/maint'
* origin/maint: maint: credit Wojciech Polak maint: post-release administrivia version 2.7 yacc.c: scope reduction tests: C90 compliance fix C90 compliance glr.c: scope reduction gnulib: update Conflicts: NEWS gnulib src/scan-gram.l src/system.h
This commit is contained in:
21
data/glr.c
21
data/glr.c
@@ -286,7 +286,7 @@ b4_percent_code_get[]dnl
|
||||
# include <setjmp.h>
|
||||
# define YYJMP_BUF jmp_buf
|
||||
# define YYSETJMP(Env) setjmp (Env)
|
||||
// Pacify clang.
|
||||
/* Pacify clang. */
|
||||
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
|
||||
#endif
|
||||
|
||||
@@ -1997,10 +1997,10 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
#if ! YYERROR_VERBOSE
|
||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||
#else
|
||||
{
|
||||
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
||||
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
|
||||
size_t yysize = yysize0;
|
||||
size_t yysize1;
|
||||
yybool yysize_overflow = yyfalse;
|
||||
char* yymsg = YY_NULL;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
@@ -2060,9 +2060,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytokenName (yyx);
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
|
||||
yysize_overflow |= yysize1 < yysize;
|
||||
yysize = yysize1;
|
||||
{
|
||||
size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
|
||||
yysize_overflow |= yysz < yysize;
|
||||
yysize = yysz;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2082,9 +2084,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
#undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + strlen (yyformat);
|
||||
yysize_overflow |= yysize1 < yysize;
|
||||
yysize = yysize1;
|
||||
{
|
||||
size_t yysz = yysize + strlen (yyformat);
|
||||
yysize_overflow |= yysz < yysize;
|
||||
yysize = yysz;
|
||||
}
|
||||
|
||||
if (!yysize_overflow)
|
||||
yymsg = (char *) YYMALLOC (yysize);
|
||||
@@ -2114,6 +2118,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
||||
yyerror (]b4_lyyerror_args[YY_("syntax error"));
|
||||
yyMemoryExhausted (yystackp);
|
||||
}
|
||||
}
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
yynerrs += 1;
|
||||
}
|
||||
|
||||
23
data/yacc.c
23
data/yacc.c
@@ -1147,7 +1147,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
{
|
||||
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
|
||||
YYSIZE_T yysize = yysize0;
|
||||
YYSIZE_T yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
@@ -1224,11 +1223,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
}
|
||||
}]b4_lac_if([[
|
||||
# if ]b4_api_PREFIX[DEBUG
|
||||
@@ -1252,10 +1253,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
# undef YYCASE_
|
||||
}
|
||||
|
||||
yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
{
|
||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
return 2;
|
||||
yysize = yysize1;
|
||||
}
|
||||
|
||||
if (*yymsg_alloc < yysize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user