From 5f3040ed5a0c9283279a0d2d3dfb815d8f0ad485 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 15 Nov 2018 12:06:46 +0000 Subject: [PATCH] misc.c (gnat_init_gcc_eh): Do not override the switch -fnon-call-exceptions passed on the command line in... * 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 | 5 +++++ gcc/ada/gcc-interface/misc.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d6004111e65..589f52f3c92 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 + + * 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 * libgnarl/a-intnam__linux.ads: Add SIGSYS. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 53913c252d8..00b73705f32 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -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; -- 2.30.2