From: Eric Botcazou Date: Thu, 15 Nov 2018 12:06:55 +0000 (+0000) Subject: misc.c (gnat_init_gcc_eh): Do not override the switch -fnon-call-exceptions passed... X-Git-Tag: releases/gcc-7.4.0~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=848b45772ea6f4912acdf67e6647b708e3c5f380;p=thirdparty%2Fgcc.git 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: r266178 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d709c3671827..9a70120ce6fc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +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-13 Eric Botcazou * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index d3f88d33475c..f23d7337e0a8 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -416,7 +416,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;