From eaf134e777a0c1e31e3351a5bba0784f2eefda8e Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 15 Jul 2005 14:49:59 +0000 Subject: 2005-07-15 Frank Ch. Eigler * Makefile.am (install-data-local): Correct typo. * buildrun.cxx (compile_pass): Ditto. * main.cxx (main): Print errors if passes 4 or 5 fail. --- main.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 69f87655..a35bbc9c 100644 --- a/main.cxx +++ b/main.cxx @@ -263,6 +263,7 @@ main (int argc, char * const argv []) } } + // syntax errors, if any, are already printed if (s.verbose) clog << "Pass 1: parsed user script and " << s.library_files.size() << " library script(s)." << endl; @@ -325,6 +326,7 @@ main (int argc, char * const argv []) << s.functions.size() << " function(s), " << s.globals.size() << " global(s)." << endl; + // semantic errors, if any, are already printed if (rc || s.last_pass == 2) goto cleanup; // PASS 3: TRANSLATION @@ -341,16 +343,25 @@ main (int argc, char * const argv []) << s.translated_source << "\"" << endl; + // translation errors, if any, are already printed if (rc || s.last_pass == 3) goto cleanup; // PASS 4: COMPILATION rc = compile_pass (s); + if (rc) + cerr << "Pass 4: compilation failed. " + << "Try again with '-v' (verbose) option." << endl; + if (rc || s.last_pass == 4) goto cleanup; // PASS 5: RUN rc = run_pass (s); + if (rc) + cerr << "Pass 5: run failed. " + << "Try again with '-v' (verbose) option." << endl; + // if (rc) goto cleanup; cleanup: -- cgit