bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[maint] lalr1.cc: avoid static_cast


From: Akim Demaille
Subject: [maint] lalr1.cc: avoid static_cast
Date: Sat, 11 Jan 2020 06:02:07 +0100

commit 3dec8a4caf19f7f772428b8a99f98d18d472efb3
Author: Akim Demaille <address@hidden>
Date:   Fri Jan 10 19:29:23 2020 +0100

    lalr1.cc: avoid static_cast
    
    Reported by donmac703.
    Fixes https://github.com/akimd/bison/issues/20.
    
    * data/skeletons/lalr1.cc: here.

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<state_type> (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<state_type> (yyn);
+      error_token.state = state_type (yyn);
       yypush_ ("Shifting", YY_MOVE (error_token));
     }
     goto yynewstate;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]