Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bc: eliminate jump into yyparse() (#562)
* When temporarily enabling warnings in bc I observe warnings for incorrect use of "next" * Function yy_err_recover() jumped to a label outside of itself, within yyparse() * yyparse() was strucured so that it first initialises flags then enters main loop * Jumping back to yyparse() was unsafe because the flags would all be cleared again, including $yyssp (yy_err_recover() already adjusts $yyssp) * Clear flags before calling yyparse(), and let yyparse() enter the loop immediately so that it's safe to call it from yy_err_recover() %perl bc # before patch 4++ line 1: syntax error Exiting subroutine via next at bc line 1387, <STDIN> line 1 (#1)
- Loading branch information