mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
Address GCC warnings about shadowed local variables (yyflag).
* data/glr.c (YYCHK): Rename yyflag as yychk_flag. (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts, yyrule, and yyflag.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2010-09-01 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Address GCC warnings about shadowed local variables (yyflag).
|
||||||
|
* data/glr.c (YYCHK): Rename yyflag as yychk_flag.
|
||||||
|
(yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
|
||||||
|
yyrule, and yyflag.
|
||||||
|
|
||||||
2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
|
2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
|
||||||
|
|
||||||
Version 2.4.3.
|
Version 2.4.3.
|
||||||
|
|||||||
20
data/glr.c
20
data/glr.c
@@ -511,9 +511,9 @@ typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
|
|||||||
|
|
||||||
#define YYCHK(YYE) \
|
#define YYCHK(YYE) \
|
||||||
do { \
|
do { \
|
||||||
YYRESULTTAG yyflag = YYE; \
|
YYRESULTTAG yychk_flag = YYE; \
|
||||||
if (yyflag != yyok) \
|
if (yychk_flag != yyok) \
|
||||||
return yyflag; \
|
return yychk_flag; \
|
||||||
} while (YYID (0))
|
} while (YYID (0))
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
@@ -1964,11 +1964,6 @@ static YYRESULTTAG
|
|||||||
yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
||||||
size_t yyposn]b4_pure_formals[)
|
size_t yyposn]b4_pure_formals[)
|
||||||
{
|
{
|
||||||
int yyaction;
|
|
||||||
const short int* yyconflicts;
|
|
||||||
yyRuleNum yyrule;
|
|
||||||
YYRESULTTAG yyflag;
|
|
||||||
|
|
||||||
while (yystackp->yytops.yystates[yyk] != NULL)
|
while (yystackp->yytops.yystates[yyk] != NULL)
|
||||||
{
|
{
|
||||||
yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
|
yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
|
||||||
@@ -1979,7 +1974,8 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
|||||||
|
|
||||||
if (yyisDefaultedState (yystate))
|
if (yyisDefaultedState (yystate))
|
||||||
{
|
{
|
||||||
yyrule = yydefaultAction (yystate);
|
YYRESULTTAG yyflag;
|
||||||
|
yyRuleNum yyrule = yydefaultAction (yystate);
|
||||||
if (yyrule == 0)
|
if (yyrule == 0)
|
||||||
{
|
{
|
||||||
YYDPRINTF ((stderr, "Stack %lu dies.\n",
|
YYDPRINTF ((stderr, "Stack %lu dies.\n",
|
||||||
@@ -2001,6 +1997,8 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
yySymbol yytoken;
|
yySymbol yytoken;
|
||||||
|
int yyaction;
|
||||||
|
const short int* yyconflicts;
|
||||||
|
|
||||||
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
|
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
|
||||||
if (yychar == YYEMPTY)
|
if (yychar == YYEMPTY)
|
||||||
@@ -2057,8 +2055,8 @@ yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yyflag = yyglrReduce (yystackp, yyk, -yyaction,
|
YYRESULTTAG yyflag = yyglrReduce (yystackp, yyk, -yyaction,
|
||||||
yyimmediate[-yyaction]]b4_user_args[);
|
yyimmediate[-yyaction]]b4_user_args[);
|
||||||
if (yyflag == yyerr)
|
if (yyflag == yyerr)
|
||||||
{
|
{
|
||||||
YYDPRINTF ((stderr, "Stack %lu dies (predicate failure or explicit user error).\n",
|
YYDPRINTF ((stderr, "Stack %lu dies (predicate failure or explicit user error).\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user