misc.c (gnat_init_gcc_eh): Do not override the switch -fnon-call-exceptions passed...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 15 Nov 2018 12:06:46 +0000 (12:06 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 15 Nov 2018 12:06:46 +0000 (12:06 +0000)
* gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the switch
-fnon-call-exceptions passed on the command line in -gnatp mode.

From-SVN: r266176

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c

index d6004111e65f382644ba8268992123bb31f1b05b..589f52f3c9252016e27a5d676107361b1361b7c1 100644 (file)
@@ -7,6 +7,11 @@
        * exp_ch4.adb (Expand_Boolean_Operation): Use this new profile.
        * exp_pakd.adb (Expand_Packed_Boolean_Operator): Ditto.
 
+2018-11-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the switch
+       -fnon-call-exceptions passed on the command line in -gnatp mode.
+
 2018-11-14  Patrick Bernardi  <bernardi@adacore.com>
 
        * libgnarl/a-intnam__linux.ads: Add SIGSYS.
index 53913c252d8db3e2ca152bbda138c9ac6bc90364..00b73705f32eb5e32ee78adcf86cbba7cc459bb8 100644 (file)
@@ -412,7 +412,10 @@ gnat_init_gcc_eh (void)
   flag_exceptions = 1;
   flag_delete_dead_exceptions = 1;
   if (Suppress_Checks)
-    flag_non_call_exceptions = Machine_Overflows_On_Target && GNAT_Mode;
+    {
+      if (!global_options_set.x_flag_non_call_exceptions)
+       flag_non_call_exceptions = Machine_Overflows_On_Target && GNAT_Mode;
+    }
   else
     {
       flag_non_call_exceptions = 1;