mirror of
https://github.com/golang/go
synced 2024-11-20 05:14:41 -07:00
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
This commit is contained in:
parent
9192548f80
commit
3208917d54
@ -119,7 +119,7 @@ yyerrorl(int line, char *fmt, ...)
|
|||||||
|
|
||||||
hcrash();
|
hcrash();
|
||||||
nerrors++;
|
nerrors++;
|
||||||
if(nerrors >= 10 && !debug['e']) {
|
if(nsavederrors+nerrors >= 10 && !debug['e']) {
|
||||||
flusherrors();
|
flusherrors();
|
||||||
print("%L: too many errors\n", line);
|
print("%L: too many errors\n", line);
|
||||||
errorexit();
|
errorexit();
|
||||||
@ -187,7 +187,7 @@ yyerror(char *fmt, ...)
|
|||||||
|
|
||||||
hcrash();
|
hcrash();
|
||||||
nerrors++;
|
nerrors++;
|
||||||
if(nerrors >= 10 && !debug['e']) {
|
if(nsavederrors+nerrors >= 10 && !debug['e']) {
|
||||||
flusherrors();
|
flusherrors();
|
||||||
print("%L: too many errors\n", parserline());
|
print("%L: too many errors\n", parserline());
|
||||||
errorexit();
|
errorexit();
|
||||||
|
Loading…
Reference in New Issue
Block a user