mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
(union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
Do not define if yyoverflow is defined, or if this is a C++ parser and either YYSTYPE or YYLTYPE has nontrivial constructors or destructors. (yymemcpy) [! defined YYSTACK_RELOCATE]: Do not define; not needed. (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
This commit is contained in:
@@ -66,6 +66,12 @@
|
|||||||
# define YYSTACK_ALLOC malloc
|
# define YYSTACK_ALLOC malloc
|
||||||
# define YYSTACK_FREE free
|
# define YYSTACK_FREE free
|
||||||
# endif
|
# endif
|
||||||
|
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
|
||||||
|
|
||||||
|
|
||||||
|
#if (! defined (yyoverflow) \
|
||||||
|
&& (! defined (__cplusplus) \
|
||||||
|
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||||||
|
|
||||||
/* A type that is properly aligned for any stack member. */
|
/* A type that is properly aligned for any stack member. */
|
||||||
union yyalloc
|
union yyalloc
|
||||||
@@ -109,7 +115,7 @@ union yyalloc
|
|||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
||||||
@@ -236,7 +242,7 @@ int yydebug;
|
|||||||
# define YYMAXDEPTH 10000
|
# define YYMAXDEPTH 10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ! defined (yyoverflow) && ! defined (yymemcpy)
|
#if defined (YYSTACK_RELOCATE) && ! defined (yymemcpy)
|
||||||
# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
||||||
# define yymemcpy __builtin_memcpy
|
# define yymemcpy __builtin_memcpy
|
||||||
# else /* not GNU C or C++ */
|
# else /* not GNU C or C++ */
|
||||||
@@ -504,6 +510,9 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
yyvs = yyvs1;
|
yyvs = yyvs1;
|
||||||
}
|
}
|
||||||
#else /* no yyoverflow */
|
#else /* no yyoverflow */
|
||||||
|
# ifndef YYSTACK_RELOCATE
|
||||||
|
goto yyoverflowlab;
|
||||||
|
# else
|
||||||
/* Extend the stack our own way. */
|
/* Extend the stack our own way. */
|
||||||
if (yystacksize >= YYMAXDEPTH)
|
if (yystacksize >= YYMAXDEPTH)
|
||||||
goto yyoverflowlab;
|
goto yyoverflowlab;
|
||||||
@@ -526,6 +535,7 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
if (yyss1 != yyssa)
|
if (yyss1 != yyssa)
|
||||||
YYSTACK_FREE (yyss1);
|
YYSTACK_FREE (yyss1);
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
#endif /* no yyoverflow */
|
#endif /* no yyoverflow */
|
||||||
|
|
||||||
yyssp = yyss + yysize - 1;
|
yyssp = yyss + yysize - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user