Do not override -fnon-call-exceptions in default mode
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 9 May 2020 20:52:21 +0000 (22:52 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 9 May 2020 20:52:21 +0000 (22:52 +0200)
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
gcc/ada/gcc-interface/misc.c

index c118afd6c9ddb1f5a0bb9750eff0b98c7a1a720e..6ee4942add5377d46326f3b89b163e468508e437 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-09  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (lvalue_required_p) <N_Selected_Component>:
index d68b37384ff7f2682f81e4a371afa998e4d7a1b4..2950cb8194d3af7bfa13fd6ccd180451f8a3f2e2 100644 (file)
@@ -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;
     }