summaryrefslogtreecommitdiff
path: root/gcc/ada/a-except.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:29:27 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:29:27 +0000
commit78a7ec5e9703e7b62e27851cae2559dc37a427fd (patch)
tree827a165cfd4e4ea24905b1ef7838caffa7b39667 /gcc/ada/a-except.ads
parent2640274167190726c3b9743d575d0584c30a7221 (diff)
downloadgcc-78a7ec5e9703e7b62e27851cae2559dc37a427fd.tar.gz
2005-06-14 Doug Rupp <rupp@adacore.com>
* s-parame-vms.ads, s-parame-hpux.ads, s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame.ads, s-parame-vxworks.ads: Default_Exception_Msg_Max_Length: new parameter. * a-except.ads: (Exception_Msg_Max_Length): Set to System.Parameters.Default_Exception_Msg_Max_Length Add pragma Preelaborate_05 for AI-362 Add warnings off to allow categorization violations for AI-362 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101017 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except.ads')
-rw-r--r--gcc/ada/a-except.ads25
1 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ada/a-except.ads b/gcc/ada/a-except.ads
index 6510f339dcd..80c9c91475d 100644
--- a/gcc/ada/a-except.ads
+++ b/gcc/ada/a-except.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 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 --
@@ -39,11 +39,24 @@ pragma Polling (Off);
-- We must turn polling off for this unit, because otherwise we get
-- elaboration circularities with ourself.
+pragma Warnings (Off);
+-- Allow withing of non-Preelaborated units in Ada 2005 mode where this
+-- package will be categorized as Preelaborate. See AI-362 for details.
+-- It is safe in the context of the run-time to violate the rules!
+
with System;
+with System.Parameters;
with System.Standard_Library;
with System.Traceback_Entries;
+pragma Warnings (On);
package Ada.Exceptions is
+pragma Warnings (Off);
+pragma Preelaborate_05 (Exceptions);
+pragma Warnings (On);
+-- In accordance with Ada 2005 AI-362. The warnings pragmas are so that we can
+-- compile this using older compiler versions, which will ignore the pragma,
+-- which is fine for the bootstrap.
type Exception_Id is private;
Null_Id : constant Exception_Id;
@@ -103,10 +116,11 @@ package Ada.Exceptions is
private
package SSL renames System.Standard_Library;
+ package SP renames System.Parameters;
subtype EOA is Exception_Occurrence_Access;
- Exception_Msg_Max_Length : constant := 200;
+ Exception_Msg_Max_Length : constant := SP.Default_Exception_Msg_Max_Length;
------------------
-- Exception_Id --
@@ -288,6 +302,11 @@ private
pragma Stream_Convert (Exception_Occurrence, String_To_EO, EO_To_String);
-- Functions for implementing Exception_Occurrence stream attributes
+ pragma Warnings (Off);
+ -- Allow non-static constants in Ada 2005 mode where this package will be
+ -- implicitly categorized as Preelaborate. See AI-362 for details. It is
+ -- safe in the context of the run-time to violate the rules!
+
Null_Occurrence : constant Exception_Occurrence := (
Id => Null_Id,
Msg_Length => 0,
@@ -299,4 +318,6 @@ private
Tracebacks => (others => TBE.Null_TB_Entry),
Private_Data => System.Null_Address);
+ pragma Warnings (On);
+
end Ada.Exceptions;