diff options
author | Hans-Peter Nilsson <hp@bitrange.com> | 2002-10-30 00:19:59 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2002-10-30 00:19:59 +0000 |
commit | 33c21f5cc0d666b959cfbe1e4fd65c76bbfd431e (patch) | |
tree | e3bb13d193cf2f5766f2f8c5afb30c82fda3b6eb /gcc | |
parent | 59db5f7beb633852cb4500d35fc5356abe49bc1f (diff) | |
download | gcc-33c21f5cc0d666b959cfbe1e4fd65c76bbfd431e.zip gcc-33c21f5cc0d666b959cfbe1e4fd65c76bbfd431e.tar.gz gcc-33c21f5cc0d666b959cfbe1e4fd65c76bbfd431e.tar.bz2 |
toplev.c (rest_of_type_compilation): Return early in case of errors.
* toplev.c (rest_of_type_compilation): Return early in case of
errors.
(check_global_declarations): Don't call debug_hooks->global_decl
in case of errors.
From-SVN: r58645
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/toplev.c | 16 |
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6250ccd..73713f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-10-29 Hans-Peter Nilsson <hp@bitrange.com> + + * toplev.c (rest_of_type_compilation): Return early in case of + errors. + (check_global_declarations): Don't call debug_hooks->global_decl + in case of errors. + 2002-10-28 Andreas Bauer <baueran@in.tum.de> * doc/c-tree.texi (Tree overview): Fix typos. diff --git a/gcc/toplev.c b/gcc/toplev.c index 447ef03..2f3d1274 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2050,9 +2050,14 @@ check_global_declarations (vec, len) && (*lang_hooks.decls.warn_unused_global) (decl)) warning_with_decl (decl, "`%s' defined but not used"); - timevar_push (TV_SYMOUT); - (*debug_hooks->global_decl) (decl); - timevar_pop (TV_SYMOUT); + /* Avoid confusing the debug information machinery when there are + errors. */ + if (errorcount == 0 && sorrycount == 0) + { + timevar_push (TV_SYMOUT); + (*debug_hooks->global_decl) (decl); + timevar_pop (TV_SYMOUT); + } } } @@ -2341,6 +2346,11 @@ rest_of_type_compilation (type, toplev) int toplev ATTRIBUTE_UNUSED; #endif { + /* Avoid confusing the debug information machinery when there are + errors. */ + if (errorcount != 0 || sorrycount != 0) + return; + timevar_push (TV_SYMOUT); #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) |