]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress (Overflow_Check).
authorRobert Dewar <dewar@adacore.com>
Thu, 31 Jul 2014 09:48:12 +0000 (09:48 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 31 Jul 2014 09:48:12 +0000 (11:48 +0200)
2014-07-31  Robert Dewar  <dewar@adacore.com>

* bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
(Overflow_Check).
* gnatlink.adb (Process_Args): Remove generation of -gnato0,
no longer needed.

From-SVN: r213329

gcc/ada/ChangeLog
gcc/ada/bindgen.adb
gcc/ada/gnatlink.adb

index b14a429106fbf610e4f407f634b77a663d78ab16..bac79b166e2e3cfeb6908dce886c182f86fc2509 100644 (file)
@@ -1,3 +1,10 @@
+2014-07-31  Robert Dewar  <dewar@adacore.com>
+
+       * 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  <dewar@adacore.com>
 
        * gnat_ugn.texi: Document new switch -gnato0.
index f045b8e02359e045051075cd30b304bcef27efe2..8d5262b48c77fc426e2107cab11f348affcf2e9c 100644 (file)
@@ -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.
 
index 0ac7113cf21b14ba479630d7e83976d06fd89781..bb79180b56e478f777407f48beffe76c69737d87 100644 (file)
@@ -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.