diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2002-03-11 13:49:26 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-03-11 13:49:26 -0800 |
commit | 6c40858f8e8ff07a7ab7fcd633046096ebc12279 (patch) | |
tree | cbf72d478a6c14b0263f69b5722d76d8340713eb | |
parent | 40adaa27975cbd1913dbf18e98d200c41be82122 (diff) | |
download | gcc-6c40858f8e8ff07a7ab7fcd633046096ebc12279.zip gcc-6c40858f8e8ff07a7ab7fcd633046096ebc12279.tar.gz gcc-6c40858f8e8ff07a7ab7fcd633046096ebc12279.tar.bz2 |
* toplev.c (rest_of_compilation): Don't compile if we've had errors.
From-SVN: r50604
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/crash52.C | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/report.C | 4 | ||||
-rw-r--r-- | gcc/toplev.c | 7 |
5 files changed, 20 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6273963..d6cde40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,11 +1,14 @@ +2002-03-11 Richard Henderson <rth@redhat.com> + + * toplev.c (rest_of_compilation): Don't compile if we've had errors. + 2002-03-11 Neil Booth <neil@daikokuya.demon.co.uk> * Makefile.in: Update. -doc: - * cppenv.texi, cppopts.texi: Split out of cpp.texi and gcc.texi. + * doc/cppenv.texi, cppopts.texi: Split out of cpp.texi and gcc.texi. Update documentation. - * gcc.texi: Include cppopts.texi and cppenv.texi. - * cpp.texi: Include cppopts.texi and cppenv.texi. + * doc/gcc.texi: Include cppopts.texi and cppenv.texi. + * doc/cpp.texi: Include cppopts.texi and cppenv.texi. 2002-03-11 Zack Weinberg <zack@codesourcery.com> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 87c3e74..d281943 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Richard Henderson <rth@redhat.com> + + * g++.old-deja/g++.brendan/crash52.C: Remove return warning marker. + * g++.old-deja/g++.jason/report.C: Likewise. + 2002-03-11 Nathan Sidwell <nathan@codesourcery.com> * testsuite/g++.old-deja/g++.other/friend9.C: Revert DR 209 changes. diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C index e8c51e8..b29271b 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C @@ -10,5 +10,4 @@ public: A &f(A &a) {// ERROR - new decl.* std::cout << "Blah\n"; -} // ERROR - non-void function - +} diff --git a/gcc/testsuite/g++.old-deja/g++.jason/report.C b/gcc/testsuite/g++.old-deja/g++.jason/report.C index 14bc9d8..bbc1ada 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/report.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/report.C @@ -55,7 +55,7 @@ bar2 baz (X::Y y) bar2 wa [5]; wa[0] = baz(f); undef2 (1); // ERROR - implicit declaration -} // ERROR - non-void +} int ninny () { @@ -70,4 +70,4 @@ int ninny () int darg (char X::*p) { undef3 (1); // ERROR - implicit declaration -} // ERROR - non-void +} diff --git a/gcc/toplev.c b/gcc/toplev.c index 6530adf..d1f7950 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2540,8 +2540,11 @@ rest_of_compilation (decl) purge_hard_subreg_sets (get_insns ()); emit_initial_value_sets (); - /* Don't return yet if -Wreturn-type; we need to do cleanup_cfg. */ - if ((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type) + /* Early return if there were errors. We can run afoul of our + consistency checks, and there's not really much point in fixing them. + Don't return yet if -Wreturn-type; we need to do cleanup_cfg. */ + if (((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type) + || errorcount || sorrycount) goto exit_rest_of_compilation; /* We may have potential sibling or tail recursion sites. Select one |