summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/a-except.adb15
-rw-r--r--gcc/ada/a-except.ads22
-rw-r--r--gcc/ada/s-soflin.ads2
4 files changed, 35 insertions, 10 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2c2baa42469..8d5355f209c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-15 Arnaud Charlet <charlet@adacore.com>
+
+ * a-except.adb, a-except.ads (Reraise_Library_Exception_If_Any): New.
+ Mark this unit preelaborate.
+ * s-soflin.ads: Make package Preelaborate.
+
2012-05-15 Robert Dewar <dewar@adacore.com>
* s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb
index f34d4975612..fc144bb1c91 100644
--- a/gcc/ada/a-except.adb
+++ b/gcc/ada/a-except.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -1175,6 +1175,19 @@ package body Ada.Exceptions is
Raise_Current_Excep (Excep.Id);
end Reraise;
+ --------------------------------------
+ -- Reraise_Library_Exception_If_Any --
+ --------------------------------------
+
+ procedure Reraise_Library_Exception_If_Any is
+ LE : Exception_Occurrence;
+ begin
+ if Library_Exception_Set then
+ LE := Library_Exception;
+ Raise_From_Controlled_Operation (LE);
+ end if;
+ end Reraise_Library_Exception_If_Any;
+
------------------------
-- Reraise_Occurrence --
------------------------
diff --git a/gcc/ada/a-except.ads b/gcc/ada/a-except.ads
index d7c14bab4e3..a77df9354fd 100644
--- a/gcc/ada/a-except.ads
+++ b/gcc/ada/a-except.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
@@ -35,7 +35,8 @@
-- This version of Ada.Exceptions is a full Ada 95 version. It omits Ada 2005
-- features such as the additional definitions of Exception_Name returning
--- Wide_[Wide_]String.
+-- Wide_[Wide_]String. If differs from the 95 version only in that it is
+-- declared Preelaborate (see declaration below for why this is done).
-- It is used for building the compiler and the basic tools, since these
-- builds may be done with bootstrap compilers that cannot handle these
@@ -56,12 +57,10 @@ with System.Standard_Library;
with System.Traceback_Entries;
package Ada.Exceptions is
- pragma Warnings (Off);
- pragma Preelaborate_05;
- pragma Warnings (On);
- -- We make this preelaborable in Ada 2005 mode. If we did not do this, then
- -- run time units used by the compiler (e.g. s-soflin.ads) would run
- -- into trouble. Conformance is not an issue, since this version is used
+ pragma Preelaborate;
+ -- We make this preelaborable. If we did not do this, then run time units
+ -- used by the compiler (e.g. s-soflin.ads) would run into trouble.
+ -- Conformance with Ada 95 is not an issue, since this version is used
-- only by the compiler.
type Exception_Id is private;
@@ -207,6 +206,13 @@ private
-- Raise Program_Error, providing information about X (an exception raised
-- during a controlled operation) in the exception message.
+ procedure Reraise_Library_Exception_If_Any;
+ pragma Export
+ (Ada, Reraise_Library_Exception_If_Any,
+ "__gnat_reraise_library_exception_if_any");
+ -- If there was an exception raised during library-level finalization,
+ -- reraise the exception.
+
procedure Reraise_Occurrence_Always (X : Exception_Occurrence);
pragma No_Return (Reraise_Occurrence_Always);
-- This differs from Raise_Occurrence only in that the caller guarantees
diff --git a/gcc/ada/s-soflin.ads b/gcc/ada/s-soflin.ads
index 701b3bceff6..01dc1737d5f 100644
--- a/gcc/ada/s-soflin.ads
+++ b/gcc/ada/s-soflin.ads
@@ -43,7 +43,7 @@ with Ada.Exceptions;
with System.Stack_Checking;
package System.Soft_Links is
- pragma Preelaborate_05;
+ pragma Preelaborate;
subtype EOA is Ada.Exceptions.Exception_Occurrence_Access;
subtype EO is Ada.Exceptions.Exception_Occurrence;