mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/skeletons/glr.c (yysplitStack): Pacify Clang 8.
This commit is contained in:
@@ -1506,7 +1506,8 @@ yysplitStack (yyGLRStack* yystackp, ptrdiff_t yyk)
|
|||||||
{
|
{
|
||||||
yyGLRState** yynewStates = YY_NULLPTR;
|
yyGLRState** yynewStates = YY_NULLPTR;
|
||||||
yybool* yynewLookaheadNeeds;
|
yybool* yynewLookaheadNeeds;
|
||||||
ptrdiff_t half_max_capacity = YYSIZEMAX / (2 * sizeof yynewStates[0]);
|
ptrdiff_t state_size = sizeof yynewStates[0];
|
||||||
|
ptrdiff_t half_max_capacity = YYSIZEMAX / 2 / state_size;
|
||||||
|
|
||||||
if (half_max_capacity < yystackp->yytops.yycapacity)
|
if (half_max_capacity < yystackp->yytops.yycapacity)
|
||||||
yyMemoryExhausted (yystackp);
|
yyMemoryExhausted (yystackp);
|
||||||
|
|||||||
Reference in New Issue
Block a user