From 1974a3cb589332cdab001a8551e427d379586790 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 31 Jul 2014 09:48:12 +0000 Subject: [PATCH] 2014-07-31 Robert Dewar * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress (Overflow_Check). * gnatlink.adb (Process_Args): Remove generation of -gnato0, no longer needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213329 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 7 +++++++ gcc/ada/bindgen.adb | 8 ++++++++ gcc/ada/gnatlink.adb | 6 ------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b14a429..bac79b1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,12 @@ 2014-07-31 Robert Dewar + * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress + (Overflow_Check). + * gnatlink.adb (Process_Args): Remove generation of -gnato0, + no longer needed. + +2014-07-31 Robert Dewar + * gnat_ugn.texi: Document new switch -gnato0. * sem_ch3.ads: Minor reformatting. * gnatlink.adb (Process_Args): Compile bind file with -gnato0 diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index f045b8e..8d5262b 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -2493,6 +2493,14 @@ package body Bindgen is ", Body_File_Name => """ & Name_Buffer (1 .. Name_Len + 3)); + -- Generate pragma Suppress (Overflow_Check). This is needed for recent + -- versions of the compiler which have overflow checks on by default. + -- We do not want overflow checking enabled for the increments of the + -- elaboration variables (since this can cause an unwanted reference to + -- the last chance exception handler for limited run-times). + + WBI ("pragma Suppress (Overflow_Check);"); + -- Generate with of System.Restrictions to initialize -- Run_Time_Restrictions. diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 0ac7113..bb79180 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -676,12 +676,6 @@ procedure Gnatlink is Binder_Options.Increment_Last; Binder_Options.Table (Binder_Options.Last) := new String'("-gnatws"); - -- Also suppress overflow checks (needed now that we have them on by - -- default, we want checks off when incrementing elaboration counters). - - Binder_Options.Increment_Last; - Binder_Options.Table (Binder_Options.Last) := new String'("-gnato0"); - -- If we did not get an ali file at all, and we had at least one -- linker option, then assume that was the intended ali file after -- all, so that we get a nicer message later on. -- 2.7.4