mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
* data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
prevent a name collision in a future patch where these names will sometimes be #define'd. (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field since it no longer has the same name as the existing argument. (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
|
||||||
|
prevent a name collision in a future patch where these names will
|
||||||
|
sometimes be #define'd.
|
||||||
|
(YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
|
||||||
|
since it no longer has the same name as the existing argument.
|
||||||
|
(yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
|
||||||
|
|
||||||
2006-12-19 Paolo Bonzini <bonzini@gnu.org>
|
2006-12-19 Paolo Bonzini <bonzini@gnu.org>
|
||||||
and Joel E. Denny <jdenny@ces.clemson.edu>
|
and Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
|||||||
18
data/push.c
18
data/push.c
@@ -373,9 +373,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
|
|||||||
/* A type that is properly aligned for any stack member. */
|
/* A type that is properly aligned for any stack member. */
|
||||||
union yyalloc
|
union yyalloc
|
||||||
{
|
{
|
||||||
yytype_int16 yyss;
|
yytype_int16 yyss_alloc;
|
||||||
YYSTYPE yyvs;
|
YYSTYPE yyvs_alloc;
|
||||||
]b4_locations_if([ YYLTYPE yyls;
|
]b4_locations_if([ YYLTYPE yyls_alloc;
|
||||||
])dnl
|
])dnl
|
||||||
[};
|
[};
|
||||||
|
|
||||||
@@ -415,12 +415,12 @@ union yyalloc
|
|||||||
elements in the stack, and YYPTR gives the new location of the
|
elements in the stack, and YYPTR gives the new location of the
|
||||||
stack. Advance YYPTR to a properly aligned location for the next
|
stack. Advance YYPTR to a properly aligned location for the next
|
||||||
stack. */
|
stack. */
|
||||||
# define YYSTACK_RELOCATE(Stack) \
|
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
YYSIZE_T yynewbytes; \
|
YYSIZE_T yynewbytes; \
|
||||||
YYCOPY (&yyptr->Stack, Stack, yysize); \
|
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
||||||
Stack = &yyptr->Stack; \
|
Stack = &yyptr->Stack_alloc; \
|
||||||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||||
} \
|
} \
|
||||||
@@ -1277,9 +1277,9 @@ m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
|||||||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||||
if (! yyptr)
|
if (! yyptr)
|
||||||
goto yyexhaustedlab;
|
goto yyexhaustedlab;
|
||||||
YYSTACK_RELOCATE (yyss);
|
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||||
YYSTACK_RELOCATE (yyvs);
|
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
||||||
]b4_locations_if([ YYSTACK_RELOCATE (yyls);])[
|
]b4_locations_if([ YYSTACK_RELOCATE (yyls_alloc, yyls);])[
|
||||||
# undef YYSTACK_RELOCATE
|
# undef YYSTACK_RELOCATE
|
||||||
if (yyss1 != ]b4_yyssa[)
|
if (yyss1 != ]b4_yyssa[)
|
||||||
YYSTACK_FREE (yyss1);
|
YYSTACK_FREE (yyss1);
|
||||||
|
|||||||
Reference in New Issue
Block a user