From e92f85c792c8c5e7846ba2bc7f5e24f08dcdfece Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 9 May 2020 22:52:21 +0200 Subject: [PATCH] Do not override -fnon-call-exceptions in default mode This was already the case in -gnatp mode. * gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the user for -fnon-call-exceptions in default mode. --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/misc.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c118afd6c9d..6ee4942add5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2020-05-09 Eric Botcazou + + * gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the user + for -fnon-call-exceptions in default mode. + 2020-05-09 Eric Botcazou * gcc-interface/trans.c (lvalue_required_p) : diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index d68b37384ff..2950cb8194d 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -417,7 +417,8 @@ gnat_init_gcc_eh (void) } else { - flag_non_call_exceptions = 1; + if (!global_options_set.x_flag_non_call_exceptions) + flag_non_call_exceptions = 1; flag_aggressive_loop_optimizations = 0; warn_aggressive_loop_optimizations = 0; } -- 2.30.2