From 3dec8a4caf19f7f772428b8a99f98d18d472efb3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 10 Jan 2020 19:29:23 +0100 Subject: [PATCH] lalr1.cc: avoid static_cast Reported by donmac703. Fixes https://github.com/akimd/bison/issues/20. * data/skeletons/lalr1.cc: here. --- data/skeletons/lalr1.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/skeletons/lalr1.cc b/data/skeletons/lalr1.cc index d3fe1b93..9036575b 100644 --- a/data/skeletons/lalr1.cc +++ b/data/skeletons/lalr1.cc @@ -921,7 +921,7 @@ b4_dollar_popdef])[]dnl --yyerrstatus_; // Shift the lookahead token. - yypush_ ("Shifting", static_cast (yyn), YY_MOVE (yyla));]b4_lac_if([[ + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla));]b4_lac_if([[ yy_lac_discard_ ("shift");]])[ goto yynewstate; @@ -1084,7 +1084,7 @@ b4_dollar_popdef])[]dnl // Shift the error token.]b4_lac_if([[ yy_lac_discard_ ("error recovery");]])[ - error_token.state = static_cast (yyn); + error_token.state = state_type (yyn); yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate;