mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-10-22 15:38:23 +00:00
c++: variants: don't leak the lookahead in error recovery
During error recovery, when discarding the lookeahead, we don't destroy it, which is caught by parse.assert assertions. Reported by Antonio Silva Correia. With an analysis and suggested patch from Michel d'Hooge. <http://savannah.gnu.org/support/?108481> * tests/c++.at (Variants): Strengthen the test to try syntax errors with discarded lookahead.
This commit is contained in:
1 parent
ee2f433512
commit
00cebd11d4
2 files changed
+44
-26
No files matched your search
@@ -901,6 +901,7 @@ b4_dollar_popdef])[]dnl
|
||||
else if (!yyempty)
|
||||
{
|
||||
yy_destroy_ ("Error: discarding", yyla);
|
||||
yyla.clear ();
|
||||
yyempty = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user