Commit 3208917d authored by Luuk van Dijk's avatar Luuk van Dijk Committed by Russ Cox

gc: look at cumulative error count, not just per-function.

Not sure if this is what you'd really want.  Maybe with a higher limit than 10
or perhaps keep checking nerrors > 10 per yyerror, but check the cumulative
after each function?

R=rsc
CC=golang-dev
https://golang.org/cl/5376064
parent 9192548f
......@@ -119,7 +119,7 @@ yyerrorl(int line, char *fmt, ...)
hcrash();
nerrors++;
if(nerrors >= 10 && !debug['e']) {
if(nsavederrors+nerrors >= 10 && !debug['e']) {
flusherrors();
print("%L: too many errors\n", line);
errorexit();
......@@ -187,7 +187,7 @@ yyerror(char *fmt, ...)
hcrash();
nerrors++;
if(nerrors >= 10 && !debug['e']) {
if(nsavederrors+nerrors >= 10 && !debug['e']) {
flusherrors();
print("%L: too many errors\n", parserline());
errorexit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment