bison-patches
[Top][All Lists]
Advanced

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

[PATCH 6/8] lalr1.cc: always initialize yylval.


From: Akim Demaille
Subject: [PATCH 6/8] lalr1.cc: always initialize yylval.
Date: Tue, 6 Nov 2012 17:47:15 +0100

* data/lalr1.cc: here.
---
 data/lalr1.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/data/lalr1.cc b/data/lalr1.cc
index 4eac635..2fe8d4c 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -520,7 +520,8 @@ do {                                        \
     int yyerrstatus_ = 0;
 
     /// Semantic value of the lookahead.
-    semantic_type yylval;
+    static semantic_type yyval_default;
+    semantic_type yylval = yyval_default;
     /// Location of the lookahead.
     location_type yylloc;
     /// The locations where the error started and ended.
-- 
1.8.0




reply via email to

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