[hackers] [scc] [cc1] Adjust how errors are counted || Quentin Rameau
commit 7bb24c18c03aaf5ee073b8bb3bfaa615f4986800
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu May 26 16:56:53 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Thu May 26 17:11:19 2016 +0200
[cc1] Adjust how errors are counted
Increment the error number before checking it, this way we actually stop
at MAXERRNUM, not MAXERRNUM + 1.
diff --git a/cc1/error.c b/cc1/error.c
index 413a49e..79feea2 100644
--- a/cc1/error.c
+++ b/cc1/error.c
_AT_@ -29,7 +29,7 @@ warn_error(int flag, char *fmt, va_list va)
fclose(stdout);
}
failure = 1;
- if (nerrors++ == MAXERRNUM) {
+ if (++nerrors == MAXERRNUM) {
fputs("too many errors\n", stderr);
exit(1);
}
Received on Thu May 26 2016 - 17:11:28 CEST
This archive was generated by hypermail 2.3.0
: Thu May 26 2016 - 17:12:14 CEST