Commit e4f422b8 by Arnaud Charlet Committed by Arnaud Charlet

a-except.adb, [...] (Reraise_Library_Exception_If_Any): New.

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.

From-SVN: r187511
parent 6eaa926a
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> 2012-05-15 Robert Dewar <dewar@adacore.com>
* s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting * s-osprim-mingw.adb, sem_eval.adb, a-calend-vms.ads: Minor reformatting
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1175,6 +1175,19 @@ package body Ada.Exceptions is ...@@ -1175,6 +1175,19 @@ package body Ada.Exceptions is
Raise_Current_Excep (Excep.Id); Raise_Current_Excep (Excep.Id);
end Reraise; 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 -- -- Reraise_Occurrence --
------------------------ ------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
-- This version of Ada.Exceptions is a full Ada 95 version. It omits Ada 2005 -- 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 -- 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 -- It is used for building the compiler and the basic tools, since these
-- builds may be done with bootstrap compilers that cannot handle these -- builds may be done with bootstrap compilers that cannot handle these
...@@ -56,12 +57,10 @@ with System.Standard_Library; ...@@ -56,12 +57,10 @@ with System.Standard_Library;
with System.Traceback_Entries; with System.Traceback_Entries;
package Ada.Exceptions is package Ada.Exceptions is
pragma Warnings (Off); pragma Preelaborate;
pragma Preelaborate_05; -- We make this preelaborable. If we did not do this, then run time units
pragma Warnings (On); -- used by the compiler (e.g. s-soflin.ads) would run into trouble.
-- We make this preelaborable in Ada 2005 mode. If we did not do this, then -- Conformance with Ada 95 is not an issue, since this version is used
-- 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
-- only by the compiler. -- only by the compiler.
type Exception_Id is private; type Exception_Id is private;
...@@ -207,6 +206,13 @@ private ...@@ -207,6 +206,13 @@ private
-- Raise Program_Error, providing information about X (an exception raised -- Raise Program_Error, providing information about X (an exception raised
-- during a controlled operation) in the exception message. -- 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); procedure Reraise_Occurrence_Always (X : Exception_Occurrence);
pragma No_Return (Reraise_Occurrence_Always); pragma No_Return (Reraise_Occurrence_Always);
-- This differs from Raise_Occurrence only in that the caller guarantees -- This differs from Raise_Occurrence only in that the caller guarantees
......
...@@ -43,7 +43,7 @@ with Ada.Exceptions; ...@@ -43,7 +43,7 @@ with Ada.Exceptions;
with System.Stack_Checking; with System.Stack_Checking;
package System.Soft_Links is package System.Soft_Links is
pragma Preelaborate_05; pragma Preelaborate;
subtype EOA is Ada.Exceptions.Exception_Occurrence_Access; subtype EOA is Ada.Exceptions.Exception_Occurrence_Access;
subtype EO is Ada.Exceptions.Exception_Occurrence; subtype EO is Ada.Exceptions.Exception_Occurrence;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment