From f6d0c2394c64bdd89ccd86a2d41ca70d02777886 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Oct 2002 18:41:43 +0000 Subject: [PATCH] (main): With --trace=time, report times even if a non-fatal error occurs. Formerly, the times were reported in some such cases but not in others. --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 7ee6c673..79cd950d 100644 --- a/src/main.c +++ b/src/main.c @@ -74,7 +74,7 @@ main (int argc, char *argv[]) timevar_pop (TV_READER); if (complaint_issued) - return EXIT_FAILURE; + goto finish; /* Find useless nonterminals and productions and reduce the grammar. */ timevar_push (TV_REDUCE); @@ -138,7 +138,7 @@ main (int argc, char *argv[]) /* Stop if there were errors, to avoid trashing previous output files. */ if (complaint_issued) - return EXIT_FAILURE; + goto finish; /* Lookaheads are no longer needed. */ timevar_push (TV_FREE); @@ -173,6 +173,8 @@ main (int argc, char *argv[]) if (trace_flag & trace_bitsets) bitset_stats_dump (stderr); + finish: + /* Stop timing and print the times. */ timevar_stop (TV_TOTAL); timevar_print (stderr); -- 2.47.2