mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-28 05:33:03 +00:00
Port to Forte Developer 7 C compiler.
(struct YYLTYPE): If locations are not being used, declare a single
dummy member, as empty structs do not conform to the C standard.
(YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
the Forte Developer 7 C compiler complains that end-of-loop
code is not reached.
This commit is contained in:
12
data/glr.c
12
data/glr.c
@@ -197,6 +197,8 @@ typedef struct YYLTYPE
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
],[
|
||||
char yydummy;
|
||||
])[
|
||||
} YYLTYPE;
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
@@ -682,7 +684,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
||||
# undef YYABORT
|
||||
# define YYABORT return yyabort
|
||||
# undef YYERROR
|
||||
# define YYERROR do { yystack->yyerrState = 0; return yyerr; } while (0)
|
||||
# define YYERROR return yyerrok, yyerr
|
||||
# undef YYRECOVERING
|
||||
# define YYRECOVERING (yystack->yyerrState != 0)
|
||||
# undef yyclearin
|
||||
@@ -691,10 +693,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
||||
# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
|
||||
# undef YYBACKUP
|
||||
# define YYBACKUP(Token, Value) \
|
||||
do { \
|
||||
yyerror (]b4_yyerror_args["syntax error: cannot back up"); \
|
||||
YYERROR; \
|
||||
} while (0)
|
||||
return yyerror (]b4_yyerror_args["syntax error: cannot back up"), \
|
||||
yyerrok, yyerr
|
||||
|
||||
yylow = 1;
|
||||
if (yyrhslen == 0)
|
||||
@@ -2016,6 +2016,8 @@ b4_location_if([
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
],[
|
||||
char yydummy;
|
||||
])
|
||||
} YYLTYPE;
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
|
||||
Reference in New Issue
Block a user