Commit 33c21f5c by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

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
parent 59db5f7b
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> 2002-10-28 Andreas Bauer <baueran@in.tum.de>
* doc/c-tree.texi (Tree overview): Fix typos. * doc/c-tree.texi (Tree overview): Fix typos.
......
...@@ -2050,9 +2050,14 @@ check_global_declarations (vec, len) ...@@ -2050,9 +2050,14 @@ check_global_declarations (vec, len)
&& (*lang_hooks.decls.warn_unused_global) (decl)) && (*lang_hooks.decls.warn_unused_global) (decl))
warning_with_decl (decl, "`%s' defined but not used"); warning_with_decl (decl, "`%s' defined but not used");
timevar_push (TV_SYMOUT); /* Avoid confusing the debug information machinery when there are
(*debug_hooks->global_decl) (decl); errors. */
timevar_pop (TV_SYMOUT); 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) ...@@ -2341,6 +2346,11 @@ rest_of_type_compilation (type, toplev)
int toplev ATTRIBUTE_UNUSED; int toplev ATTRIBUTE_UNUSED;
#endif #endif
{ {
/* Avoid confusing the debug information machinery when there are
errors. */
if (errorcount != 0 || sorrycount != 0)
return;
timevar_push (TV_SYMOUT); timevar_push (TV_SYMOUT);
#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment