From 7ac2148be58dca3f0100951bf57da0d7e84d1531 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 17 Sep 1998 13:55:51 +0000 Subject: [PATCH] [multiple changes] Thu Sep 17 16:42:16 EDT 1998 Andrew MacLeod * except.c (start_catch_handler): Issue 'fatal' instead of 'error' and re-align some code. * libgcc2.c (__eh_rtime_match): fprintf a runtime error. Use . 1998-09-17 Andrew MacLeod * exception.cc (__cplus_type_matcher): realign some code. From-SVN: r22462 --- gcc/ChangeLog | 6 ++++++ gcc/cp/ChangeLog | 4 ++++ gcc/cp/exception.cc | 4 ++-- gcc/except.c | 8 ++++---- gcc/libgcc2.c | 12 +++++++++--- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 791cc44d7a0..82f31f561f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Thu Sep 17 16:42:16 EDT 1998 Andrew MacLeod + + * except.c (start_catch_handler): Issue 'fatal' instead of 'error' and + re-align some code. + * libgcc2.c (__eh_rtime_match): fprintf a runtime error. Use . + Thu Sep 17 12:24:33 1998 J"orn Rennecke * regmove.c (copy_src_to_dest): Check that modes match. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dbac087476b..06cb294004e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +1998-09-17 Andrew MacLeod + + * exception.cc (__cplus_type_matcher): realign some code. + 1998-09-16 Mark Mitchell * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling. diff --git a/gcc/cp/exception.cc b/gcc/cp/exception.cc index 5fafd1f0683..05b431521cc 100644 --- a/gcc/cp/exception.cc +++ b/gcc/cp/exception.cc @@ -158,8 +158,8 @@ __cplus_type_matcher (cp_eh_info *info, rtimetype match_info, void *ret; /* No exception table implies the old style mechanism, so don't check. */ - if (exception_table != NULL && - exception_table->lang.language != EH_LANG_C_plus_plus) + if (exception_table != NULL + && exception_table->lang.language != EH_LANG_C_plus_plus) return NULL; if (match_info == CATCH_ALL_TYPE) diff --git a/gcc/except.c b/gcc/except.c index d1e82208d42..2ac0217e263 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1622,16 +1622,16 @@ start_catch_handler (rtime) rtx call_rtx, rtime_address; if (catchstack.top->entry->false_label != NULL_RTX) - error ("never issued previous false_label"); + fatal ("Compiler Bug: Never issued previous false_label"); catchstack.top->entry->false_label = gen_exception_label (); rtime_address = expand_expr (rtime, NULL_RTX, Pmode, EXPAND_INITIALIZER); rtime_address = force_reg (Pmode, rtime_address); /* Now issue the call, and branch around handler if needed */ - call_rtx = emit_library_call_value ( - gen_rtx_SYMBOL_REF (Pmode, "__eh_rtime_match"), NULL_RTX, - 0, SImode, 1, rtime_address, Pmode); + call_rtx = emit_library_call_value + (gen_rtx_SYMBOL_REF (Pmode, "__eh_rtime_match"), NULL_RTX, + 0, SImode, 1, rtime_address, Pmode); /* Did the function return true? */ emit_cmp_insn (call_rtx, const0_rtx, EQ, NULL_RTX, diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 821387b3960..1e5947bb5e3 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3058,6 +3058,7 @@ __empty () /* Include definitions of EH context and table layout */ #include "eh-common.h" +#include /* This is a safeguard for dynamic handler chain. */ @@ -3364,10 +3365,15 @@ __eh_rtime_match (void *rtime) info = *(__get_eh_info ()); matcher = ((__eh_info *)info)->match_function; - if (!matcher) - perror ("No runtime type matcher available"); +#ifndef inhibit_libc + if (! matcher) + { + fprintf (stderr, "Internal Compiler Bug: No runtime type matcher."); + return 0; + } +#endif ret = (*matcher) (info, rtime, (void *)0); - return ((int)ret); + return (ret != NULL); } /* This value identifies the place from which an exception is being -- 2.30.2