mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
* data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
so they don't collide with user-defined macros. (yy_stack_print): Don't assume that yytype_int16 promotes to int; this was never guaranteed, and now that we're using gnulib stdint, which defines int_fast16_t to long int, the problem is exposed.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
|
||||||
|
so they don't collide with user-defined macros.
|
||||||
|
(yy_stack_print): Don't assume that yytype_int16 promotes to int;
|
||||||
|
this was never guaranteed, and now that we're using gnulib stdint,
|
||||||
|
which defines int_fast16_t to long int, the problem is exposed.
|
||||||
|
|
||||||
2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
|
2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
* data/c.m4 (b4_basename): Simplify a bit, since we don't
|
* data/c.m4 (b4_basename): Simplify a bit, since we don't
|
||||||
|
|||||||
15
data/yacc.c
15
data/yacc.c
@@ -286,9 +286,9 @@ typedef short int yytype_int16;
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
# define YYID(n) (n)
|
# define YYID(n) (n)
|
||||||
#else
|
#else
|
||||||
]b4_c_function_def([YYID], [static int], [[int i], [i]])[
|
]b4_c_function_def([YYID], [static int], [[int yyi], [yyi]])[
|
||||||
{
|
{
|
||||||
return i;
|
return yyi;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -673,12 +673,15 @@ do { \
|
|||||||
`------------------------------------------------------------------*/
|
`------------------------------------------------------------------*/
|
||||||
|
|
||||||
]b4_c_function_def([yy_stack_print], [static void],
|
]b4_c_function_def([yy_stack_print], [static void],
|
||||||
[[yytype_int16 *bottom], [bottom]],
|
[[yytype_int16 *yybottom], [yybottom]],
|
||||||
[[yytype_int16 *top], [top]])[
|
[[yytype_int16 *yytop], [yytop]])[
|
||||||
{
|
{
|
||||||
YYFPRINTF (stderr, "Stack now");
|
YYFPRINTF (stderr, "Stack now");
|
||||||
for (; bottom <= top; ++bottom)
|
for (; yybottom <= yytop; yybottom++)
|
||||||
YYFPRINTF (stderr, " %d", *bottom);
|
{
|
||||||
|
int yybot = *yybottom;
|
||||||
|
YYFPRINTF (stderr, " %d", yybot);
|
||||||
|
}
|
||||||
YYFPRINTF (stderr, "\n");
|
YYFPRINTF (stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user