Commit 531073e7 by Richard Henderson Committed by Richard Henderson

Make -fsjlj-exceptions a configure option.

From-SVN: r40905
parent 979988f3
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
* gthr-single.h (UNUSED): New. Distinguish between how C * gthr-single.h (UNUSED): New. Distinguish between how C
and C++ mark unused function arguments. Use throughout. and C++ mark unused function arguments. Use throughout.
* Makefile.in (cs-tconfig.h): Copy USING_SJLJ_EXCEPTIONS
value to target configuration header.
* configure.in (CONFIG_SJLJ_EXCEPTIONS): New.
* config.in, configure: Rebuild.
* except.h (USING_SJLJ_EXCEPTIONS): New. Define based on
configuration and target defines.
(exceptions_via_longjmp): Remove.
* dwarf2out.c, except.c, final.c, toplev.c, config/ia64/ia64.c:
Use USING_SJLJ_EXCEPTIONS instead of exceptions_via_longjmp.
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Don't check for bcopy. * configure.in: Don't check for bcopy.
......
...@@ -887,10 +887,19 @@ cs-hconfig.h: Makefile ...@@ -887,10 +887,19 @@ cs-hconfig.h: Makefile
TARGET_CPU_DEFAULT="$(target_cpu_default)" \ TARGET_CPU_DEFAULT="$(target_cpu_default)" \
$(SHELL) $(srcdir)/mkconfig.sh hconfig.h $(SHELL) $(srcdir)/mkconfig.sh hconfig.h
cs-tconfig.h: Makefile cs-tconfig.h: Makefile $(GCONFIG_H) insn-flags.h except.h
HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \ HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \
TARGET_CPU_DEFAULT="" \ TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tconfig.h $(SHELL) $(srcdir)/mkconfig.sh tconfig.h
# ??? Need extra help to get this definition copied to where libgcc can
# see it. It shouldn't matter which compiler we use to get there.
echo '#include "config.h"' > conftest.c
echo '#include "except.h"' >> conftest.c
echo 'xyzzy USING_SJLJ_EXCEPTIONS' >> conftest.c
$(HOST_CC) -E conftest.c $(HOST_CFLAGS) $(INCLUDES) > conftest.out
sed -e 's/xyzzy/#define USING_SJLJ_EXCEPTIONS/' -e '/#define/p' \
-e d conftest.out >> tconfig.h
rm conftest.*
cs-tm_p.h: Makefile cs-tm_p.h: Makefile
HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \ HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \
......
...@@ -467,6 +467,9 @@ ...@@ -467,6 +467,9 @@
/* Define to 1 if you want to enable namespaces (-fhonor-std) by default. */ /* Define to 1 if you want to enable namespaces (-fhonor-std) by default. */
#undef ENABLE_STD_NAMESPACE #undef ENABLE_STD_NAMESPACE
/* Define 0/1 to force the choice for exception handling model. */
#undef CONFIG_SJLJ_EXCEPTIONS
/* Bison unconditionally undefines `const' if neither `__STDC__' nor /* Bison unconditionally undefines `const' if neither `__STDC__' nor
__cplusplus are defined. That's a problem since we use `const' in __cplusplus are defined. That's a problem since we use `const' in
......
...@@ -2470,7 +2470,7 @@ ia64_function_prologue (file, size) ...@@ -2470,7 +2470,7 @@ ia64_function_prologue (file, size)
current_frame_info.n_output_regs, current_frame_info.n_output_regs,
current_frame_info.n_rotate_regs); current_frame_info.n_rotate_regs);
if (!flag_unwind_tables && (!flag_exceptions || exceptions_via_longjmp)) if (!flag_unwind_tables && (!flag_exceptions || USING_SJLJ_EXCEPTIONS))
return; return;
/* Emit the .prologue directive. */ /* Emit the .prologue directive. */
...@@ -2529,7 +2529,7 @@ void ...@@ -2529,7 +2529,7 @@ void
ia64_output_end_prologue (file) ia64_output_end_prologue (file)
FILE *file; FILE *file;
{ {
if (!flag_unwind_tables && (!flag_exceptions || exceptions_via_longjmp)) if (!flag_unwind_tables && (!flag_exceptions || USING_SJLJ_EXCEPTIONS))
return; return;
fputs ("\t.body\n", file); fputs ("\t.body\n", file);
...@@ -6587,7 +6587,7 @@ process_for_unwind_directive (asm_out_file, insn) ...@@ -6587,7 +6587,7 @@ process_for_unwind_directive (asm_out_file, insn)
rtx insn; rtx insn;
{ {
if (flag_unwind_tables if (flag_unwind_tables
|| (flag_exceptions && !exceptions_via_longjmp)) || (flag_exceptions && !USING_SJLJ_EXCEPTIONS))
{ {
rtx pat; rtx pat;
......
...@@ -1666,6 +1666,13 @@ else ...@@ -1666,6 +1666,13 @@ else
fi fi
AC_SUBST(MAINT)dnl AC_SUBST(MAINT)dnl
# With Setjmp/Longjmp based exception handling.
AC_ARG_ENABLE(sjlj-exceptions,
[ --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling.],
[sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
[Define 0/1 to force the choice for exception handling model.])])
# Make empty files to contain the specs and options for each language. # Make empty files to contain the specs and options for each language.
# Then add #include lines to for a compiler that has specs and/or options. # Then add #include lines to for a compiler that has specs and/or options.
......
2001-03-27 Richard Henderson <rth@redhat.com>
* except.c: Use USING_SJLJ_EXCEPTIONS instead of
exceptions_via_longjmp.
2001-03-27 Phil Edwards <pme@sources.redhat.com> 2001-03-27 Phil Edwards <pme@sources.redhat.com>
* pt.c (check_default_tmpl_args): Make error messages clearer. * pt.c (check_default_tmpl_args): Make error messages clearer.
......
...@@ -788,13 +788,13 @@ expand_exception_blocks () ...@@ -788,13 +788,13 @@ expand_exception_blocks ()
/* We cannot protect n regions this way if we must flow into the /* We cannot protect n regions this way if we must flow into the
EH region through the top of the region, as we have to with EH region through the top of the region, as we have to with
the setjmp/longjmp approach. */ the setjmp/longjmp approach. */
if (exceptions_via_longjmp == 0) if (USING_SJLJ_EXCEPTIONS == 0)
expand_eh_region_start (); expand_eh_region_start ();
emit_insns (catch_clauses); emit_insns (catch_clauses);
catch_clauses = catch_clauses_last = NULL_RTX; catch_clauses = catch_clauses_last = NULL_RTX;
if (exceptions_via_longjmp == 0) if (USING_SJLJ_EXCEPTIONS == 0)
expand_eh_region_end (build_terminate_handler ()); expand_eh_region_end (build_terminate_handler ());
emit_insns (catch_clauses); emit_insns (catch_clauses);
...@@ -852,7 +852,7 @@ expand_throw (exp) ...@@ -852,7 +852,7 @@ expand_throw (exp)
/* A Java `throw' statement. */ /* A Java `throw' statement. */
tree args = tree_cons (NULL_TREE, exp, NULL); tree args = tree_cons (NULL_TREE, exp, NULL);
fn = get_identifier (exceptions_via_longjmp fn = get_identifier (USING_SJLJ_EXCEPTIONS
? "_Jv_Sjlj_Throw" ? "_Jv_Sjlj_Throw"
: "_Jv_Throw"); : "_Jv_Throw");
if (IDENTIFIER_GLOBAL_VALUE (fn)) if (IDENTIFIER_GLOBAL_VALUE (fn))
......
...@@ -86,7 +86,7 @@ dwarf2out_do_frame () ...@@ -86,7 +86,7 @@ dwarf2out_do_frame ()
#endif #endif
#ifdef DWARF2_UNWIND_INFO #ifdef DWARF2_UNWIND_INFO
|| flag_unwind_tables || flag_unwind_tables
|| (flag_exceptions && ! exceptions_via_longjmp) || (flag_exceptions && ! USING_SJLJ_EXCEPTIONS)
#endif #endif
); );
} }
...@@ -1936,11 +1936,11 @@ dwarf2out_frame_finish () ...@@ -1936,11 +1936,11 @@ dwarf2out_frame_finish ()
#ifdef MIPS_DEBUGGING_INFO #ifdef MIPS_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG) if (write_symbols == DWARF2_DEBUG)
output_call_frame_info (0); output_call_frame_info (0);
if (flag_unwind_tables || (flag_exceptions && ! exceptions_via_longjmp)) if (flag_unwind_tables || (flag_exceptions && ! USING_SJLJ_EXCEPTIONS))
output_call_frame_info (1); output_call_frame_info (1);
#else #else
if (write_symbols == DWARF2_DEBUG if (write_symbols == DWARF2_DEBUG
|| flag_unwind_tables || (flag_exceptions && ! exceptions_via_longjmp)) || flag_unwind_tables || (flag_exceptions && ! USING_SJLJ_EXCEPTIONS))
output_call_frame_info (1); output_call_frame_info (1);
#endif #endif
} }
......
...@@ -409,11 +409,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -409,11 +409,6 @@ Boston, MA 02111-1307, USA. */
#include "ggc.h" #include "ggc.h"
#include "tm_p.h" #include "tm_p.h"
/* One to use setjmp/longjmp method of generating code for exception
handling. */
int exceptions_via_longjmp = 2;
/* One to enable asynchronous exception support. */ /* One to enable asynchronous exception support. */
int flag_non_call_exceptions = 0; int flag_non_call_exceptions = 0;
...@@ -671,7 +666,7 @@ receive_exception_label (handler_label) ...@@ -671,7 +666,7 @@ receive_exception_label (handler_label)
{ {
rtx around_label = NULL_RTX; rtx around_label = NULL_RTX;
if (! flag_new_exceptions || exceptions_via_longjmp) if (! flag_new_exceptions || USING_SJLJ_EXCEPTIONS)
{ {
around_label = gen_label_rtx (); around_label = gen_label_rtx ();
emit_jump (around_label); emit_jump (around_label);
...@@ -680,7 +675,7 @@ receive_exception_label (handler_label) ...@@ -680,7 +675,7 @@ receive_exception_label (handler_label)
emit_label (handler_label); emit_label (handler_label);
if (! exceptions_via_longjmp) if (! USING_SJLJ_EXCEPTIONS)
{ {
#ifdef HAVE_exception_receiver #ifdef HAVE_exception_receiver
if (HAVE_exception_receiver) if (HAVE_exception_receiver)
...@@ -1413,7 +1408,7 @@ expand_eh_region_start_tree (decl, cleanup) ...@@ -1413,7 +1408,7 @@ expand_eh_region_start_tree (decl, cleanup)
/* The optimization only applies to actions protected with /* The optimization only applies to actions protected with
terminate, and only applies if we are using the setjmp/longjmp terminate, and only applies if we are using the setjmp/longjmp
codegen method. */ codegen method. */
if (exceptions_via_longjmp if (USING_SJLJ_EXCEPTIONS
&& protect_cleanup_actions_with_terminate) && protect_cleanup_actions_with_terminate)
{ {
tree func, arg; tree func, arg;
...@@ -1481,7 +1476,7 @@ expand_eh_region_start_for_decl (decl) ...@@ -1481,7 +1476,7 @@ expand_eh_region_start_for_decl (decl)
automatically. */ automatically. */
mark_block_as_eh_region (); mark_block_as_eh_region ();
if (exceptions_via_longjmp) if (USING_SJLJ_EXCEPTIONS)
{ {
/* Arrange for returns and gotos to pop the entry we make on the /* Arrange for returns and gotos to pop the entry we make on the
dynamic handler stack. */ dynamic handler stack. */
...@@ -1492,7 +1487,7 @@ expand_eh_region_start_for_decl (decl) ...@@ -1492,7 +1487,7 @@ expand_eh_region_start_for_decl (decl)
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG); note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
NOTE_EH_HANDLER (note) NOTE_EH_HANDLER (note)
= CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label); = CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
if (exceptions_via_longjmp) if (USING_SJLJ_EXCEPTIONS)
start_dynamic_handler (); start_dynamic_handler ();
} }
...@@ -1532,7 +1527,7 @@ expand_eh_region_end (handler) ...@@ -1532,7 +1527,7 @@ expand_eh_region_end (handler)
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END); note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
ret = NOTE_EH_HANDLER (note) ret = NOTE_EH_HANDLER (note)
= CODE_LABEL_NUMBER (entry->exception_handler_label); = CODE_LABEL_NUMBER (entry->exception_handler_label);
if (exceptions_via_longjmp == 0 && ! flag_new_exceptions if (USING_SJLJ_EXCEPTIONS == 0 && ! flag_new_exceptions
/* We share outer_context between regions; only emit it once. */ /* We share outer_context between regions; only emit it once. */
&& INSN_UID (entry->outer_context) == 0) && INSN_UID (entry->outer_context) == 0)
{ {
...@@ -1592,7 +1587,7 @@ expand_eh_region_end (handler) ...@@ -1592,7 +1587,7 @@ expand_eh_region_end (handler)
void void
expand_fixup_region_start () expand_fixup_region_start ()
{ {
if (! doing_eh (0) || exceptions_via_longjmp) if (! doing_eh (0) || USING_SJLJ_EXCEPTIONS)
return; return;
expand_eh_region_start (); expand_eh_region_start ();
...@@ -1611,7 +1606,7 @@ expand_fixup_region_end (cleanup) ...@@ -1611,7 +1606,7 @@ expand_fixup_region_end (cleanup)
struct eh_node *node; struct eh_node *node;
int dont_issue; int dont_issue;
if (! doing_eh (0) || exceptions_via_longjmp) if (! doing_eh (0) || USING_SJLJ_EXCEPTIONS)
return; return;
for (node = ehstack.top; node && node->entry->finalization != cleanup; ) for (node = ehstack.top; node && node->entry->finalization != cleanup; )
...@@ -1658,7 +1653,7 @@ expand_fixup_region_end (cleanup) ...@@ -1658,7 +1653,7 @@ expand_fixup_region_end (cleanup)
void void
emit_throw () emit_throw ()
{ {
if (exceptions_via_longjmp) if (USING_SJLJ_EXCEPTIONS)
{ {
emit_library_call (sjthrow_libfunc, 0, VOIDmode, 0); emit_library_call (sjthrow_libfunc, 0, VOIDmode, 0);
} }
...@@ -1739,7 +1734,7 @@ start_catch_handler (rtime) ...@@ -1739,7 +1734,7 @@ start_catch_handler (rtime)
add_new_handler (eh_region_entry, get_new_handler (handler_label, rtime)); add_new_handler (eh_region_entry, get_new_handler (handler_label, rtime));
if (flag_new_exceptions && ! exceptions_via_longjmp) if (flag_new_exceptions && ! USING_SJLJ_EXCEPTIONS)
return; return;
/* Under the old mechanism, as well as setjmp/longjmp, we need to /* Under the old mechanism, as well as setjmp/longjmp, we need to
...@@ -1787,7 +1782,7 @@ end_catch_handler () ...@@ -1787,7 +1782,7 @@ end_catch_handler ()
if (! doing_eh (1)) if (! doing_eh (1))
return; return;
if (flag_new_exceptions && ! exceptions_via_longjmp) if (flag_new_exceptions && ! USING_SJLJ_EXCEPTIONS)
{ {
emit_barrier (); emit_barrier ();
return; return;
...@@ -1936,7 +1931,7 @@ expand_start_all_catch () ...@@ -1936,7 +1931,7 @@ expand_start_all_catch ()
out of line, we arrange to rethrow in the outer context. We need to out of line, we arrange to rethrow in the outer context. We need to
do this because we are not physically within the region, if any, that do this because we are not physically within the region, if any, that
logically contains this catch block. */ logically contains this catch block. */
if (! exceptions_via_longjmp) if (! USING_SJLJ_EXCEPTIONS)
{ {
expand_eh_region_start (); expand_eh_region_start ();
ehstack.top->entry->outer_context = outer_context; ehstack.top->entry->outer_context = outer_context;
...@@ -1963,7 +1958,7 @@ expand_end_all_catch () ...@@ -1963,7 +1958,7 @@ expand_end_all_catch ()
entry = pop_eh_entry (&catchstack); entry = pop_eh_entry (&catchstack);
free (entry); free (entry);
if (! exceptions_via_longjmp) if (! USING_SJLJ_EXCEPTIONS)
{ {
rtx outer_context = ehstack.top->entry->outer_context; rtx outer_context = ehstack.top->entry->outer_context;
...@@ -2010,7 +2005,7 @@ static void ...@@ -2010,7 +2005,7 @@ static void
expand_rethrow (label) expand_rethrow (label)
rtx label; rtx label;
{ {
if (exceptions_via_longjmp) if (USING_SJLJ_EXCEPTIONS)
emit_throw (); emit_throw ();
else else
if (flag_new_exceptions) if (flag_new_exceptions)
...@@ -2085,7 +2080,7 @@ protect_with_terminate (e) ...@@ -2085,7 +2080,7 @@ protect_with_terminate (e)
/* We only need to do this when using setjmp/longjmp EH and the /* We only need to do this when using setjmp/longjmp EH and the
language requires it, as otherwise we protect all of the handlers language requires it, as otherwise we protect all of the handlers
at once, if we need to. */ at once, if we need to. */
if (exceptions_via_longjmp && protect_cleanup_actions_with_terminate) if (USING_SJLJ_EXCEPTIONS && protect_cleanup_actions_with_terminate)
{ {
tree handler, result; tree handler, result;
...@@ -2389,7 +2384,7 @@ output_function_exception_table () ...@@ -2389,7 +2384,7 @@ output_function_exception_table ()
Inlined functions may use it too, and thus we'll have to be able Inlined functions may use it too, and thus we'll have to be able
to change them too. to change them too.
This is done only if using exceptions_via_longjmp. */ This is done only if using USING_SJLJ_EXCEPTIONS. */
void void
emit_eh_context () emit_eh_context ()
......
...@@ -472,10 +472,6 @@ extern void push_ehqueue PARAMS ((void)); ...@@ -472,10 +472,6 @@ extern void push_ehqueue PARAMS ((void));
/* Restore a previously pushed ehqueue. */ /* Restore a previously pushed ehqueue. */
extern void pop_ehqueue PARAMS ((void)); extern void pop_ehqueue PARAMS ((void));
/* One to use setjmp/longjmp method of generating code. */
extern int exceptions_via_longjmp;
/* One to enable asynchronous exception support. */ /* One to enable asynchronous exception support. */
extern int flag_non_call_exceptions; extern int flag_non_call_exceptions;
...@@ -516,3 +512,27 @@ void init_insn_eh_region PARAMS ((rtx, int)); ...@@ -516,3 +512,27 @@ void init_insn_eh_region PARAMS ((rtx, int));
#ifdef rtx #ifdef rtx
#undef rtx #undef rtx
#endif #endif
/* Just because the user configured --with-sjlj-exceptions=no doesn't
mean that we can use call frame exceptions. Detect that the target
has appropriate support. */
#ifdef CONFIG_SJLJ_EXCEPTIONS
# if CONFIG_SJLJ_EXCEPTIONS == 1
# define USING_SJLJ_EXCEPTIONS 1
# endif
# if CONFIG_SJLJ_EXCEPTIONS == 0
# define USING_SJLJ_EXCEPTIONS 0
# if !defined(DWARF2_UNWIND_INFO) && !defined(IA64_UNWIND_INFO)
#error "{DWARF2,IA64}_UNWIND_INFO required"
# endif
# endif
#else
# ifdef IA64_UNWIND_INFO
# define USING_SJLJ_EXCEPTIONS (!IA64_UNWIND_INFO)
# else
# ifdef DWARF2_UNWIND_INFO
# define USING_SJLJ_EXCEPTIONS (!DWARF2_UNWIND_INFO)
# endif
# endif
#endif
...@@ -2126,7 +2126,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2126,7 +2126,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break; break;
case NOTE_INSN_EH_REGION_BEG: case NOTE_INSN_EH_REGION_BEG:
if (! exceptions_via_longjmp) if (! USING_SJLJ_EXCEPTIONS)
{ {
ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_EH_HANDLER (insn)); ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_EH_HANDLER (insn));
if (! flag_new_exceptions) if (! flag_new_exceptions)
...@@ -2138,7 +2138,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2138,7 +2138,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break; break;
case NOTE_INSN_EH_REGION_END: case NOTE_INSN_EH_REGION_END:
if (! exceptions_via_longjmp) if (! USING_SJLJ_EXCEPTIONS)
{ {
ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_EH_HANDLER (insn)); ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_EH_HANDLER (insn));
if (flag_new_exceptions) if (flag_new_exceptions)
......
2001-03-27 Richard Henderson <rth@redhat.com> 2001-03-27 Richard Henderson <rth@redhat.com>
* expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
exceptions_via_longjmp.
2001-03-27 Richard Henderson <rth@redhat.com>
* decl.c (end_java_method): Rename asynchronous_exceptions to * decl.c (end_java_method): Rename asynchronous_exceptions to
flag_non_call_exceptions. flag_non_call_exceptions.
* parse.y (source_end_java_method): Likewise. * parse.y (source_end_java_method): Likewise.
......
...@@ -600,7 +600,7 @@ build_java_athrow (node) ...@@ -600,7 +600,7 @@ build_java_athrow (node)
call = build (CALL_EXPR, call = build (CALL_EXPR,
void_type_node, void_type_node,
build_address_of (throw_node[exceptions_via_longjmp ? 1 : 0]), build_address_of (throw_node[USING_SJLJ_EXCEPTIONS ? 1 : 0]),
build_tree_list (NULL_TREE, node), build_tree_list (NULL_TREE, node),
NULL_TREE); NULL_TREE);
TREE_SIDE_EFFECTS (call) = 1; TREE_SIDE_EFFECTS (call) = 1;
......
...@@ -673,7 +673,7 @@ typedef struct _jdeplist { ...@@ -673,7 +673,7 @@ typedef struct _jdeplist {
{ \ { \
(WHERE) = \ (WHERE) = \
build (CALL_EXPR, void_type_node, \ build (CALL_EXPR, void_type_node, \
build_address_of (throw_node[exceptions_via_longjmp ? 1 : 0]), \ build_address_of (throw_node[USING_SJLJ_EXCEPTIONS ? 1 : 0]), \
build_tree_list (NULL_TREE, (WHAT)), NULL_TREE); \ build_tree_list (NULL_TREE, (WHAT)), NULL_TREE); \
TREE_SIDE_EFFECTS ((WHERE)) = 1; \ TREE_SIDE_EFFECTS ((WHERE)) = 1; \
} }
......
2001-03-27 Richard Henderson <rth@redhat.com>
* g++.old-deja/g++.eh/crash3.C: Don't use -fsjlj-exceptions.
* g++.old-deja/g++.eh/vbase3.C: Likewise.
2001-03-27 Alan Modra <alan@linuxcare.com.au> 2001-03-27 Alan Modra <alan@linuxcare.com.au>
* gcc.c-torture/compile/20010327-1.c: New test. * gcc.c-torture/compile/20010327-1.c: New test.
......
// Build don't link: // Build don't link:
// Origin: Marc Espie <Marc.Espie@liafa.jussieu.fr> // Origin: Marc Espie <Marc.Espie@liafa.jussieu.fr>
// Special g++ Options: -fsjlj-exceptions // Used to use -fsjlj-exceptions, but that isn't an option anymore.
extern double f(double a); extern double f(double a);
......
// Build don't link: // Build don't link:
// Special g++ Options: -fsjlj-exceptions // Used to use -fsjlj-exceptions, but that isn't an option anymore.
// Origin: Donn Terry <donn@interix.com> // Origin: Donn Terry <donn@interix.com>
struct ios { struct ios {
......
...@@ -1081,8 +1081,6 @@ lang_independent_options f_options[] = ...@@ -1081,8 +1081,6 @@ lang_independent_options f_options[] =
"Use the new model for exception handling" }, "Use the new model for exception handling" },
{"unwind-tables", &flag_unwind_tables, 1, {"unwind-tables", &flag_unwind_tables, 1,
"Just generate unwind tables for exception handling" }, "Just generate unwind tables for exception handling" },
{"sjlj-exceptions", &exceptions_via_longjmp, 1,
"Use setjmp/longjmp to handle exceptions" },
{"non-call-exceptions", &flag_non_call_exceptions, 1, {"non-call-exceptions", &flag_non_call_exceptions, 1,
"Support synchronous non-call exceptions" }, "Support synchronous non-call exceptions" },
{"profile-arcs", &profile_arc_flag, 1, {"profile-arcs", &profile_arc_flag, 1,
...@@ -4877,19 +4875,6 @@ toplev_main (argc, argv) ...@@ -4877,19 +4875,6 @@ toplev_main (argc, argv)
OVERRIDE_OPTIONS; OVERRIDE_OPTIONS;
#endif #endif
if (exceptions_via_longjmp == 2)
{
#ifdef DWARF2_UNWIND_INFO
exceptions_via_longjmp = ! DWARF2_UNWIND_INFO;
#else
#ifdef IA64_UNWIND_INFO
exceptions_via_longjmp = ! IA64_UNWIND_INFO;
#else
exceptions_via_longjmp = 1;
#endif
#endif
}
/* Since each function gets its own handler data, we can't support the /* Since each function gets its own handler data, we can't support the
new model currently, since it depend on a specific rethrow label new model currently, since it depend on a specific rethrow label
which is declared at the front of the table, and we can only which is declared at the front of the table, and we can only
......
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