s-parame-vms.ads, [...]: Default_Exception_Msg_Max_Length: new parameter.
authorDoug Rupp <rupp@adacore.com>
Thu, 16 Jun 2005 08:29:27 +0000 (10:29 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 16 Jun 2005 08:29:27 +0000 (10:29 +0200)
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

From-SVN: r101017

gcc/ada/a-except.ads
gcc/ada/s-parame-ae653.ads
gcc/ada/s-parame-hpux.ads
gcc/ada/s-parame-vms-restrict.ads
gcc/ada/s-parame-vms.ads
gcc/ada/s-parame-vxworks.ads
gcc/ada/s-parame.ads

index 6510f339dcd21487f32987dc2582306ad2c44462..80c9c91475da1202aa6cb45727da2630d7ea16dd 100644 (file)
@@ -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;
index af397c2aeb73a5c43ad0df4bcb646c6a24212e5b..45fcc53e36309510f68ac4972d7b62299e5a070b 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -31,7 +31,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the default VxWorks AE 653 version of the package.`
+--  This is the default VxWorks AE 653 version of the package
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -200,4 +200,12 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 200;
+   --  This constant specifies the default number of characters to allow
+   --  in an exception message (200 is minimum required by RM 11.4.1(18)).
+
 end System.Parameters;
index 8be952a18c29f3cf617315d960e728a22a82f7d4..968ec33b2b8cad37a84e242d59c472065f05fb5e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -32,7 +32,6 @@
 ------------------------------------------------------------------------------
 
 --  This is the HP version of this package
---  Blank line intentional so that it lines up exactly with default.
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -199,4 +198,12 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 200;
+   --  This constant specifies the default number of characters to allow
+   --  in an exception message (200 is minimum required by RM 11.4.1(18)).
+
 end System.Parameters;
index d1d48188176134bd328f6c0d94ac8b9fcfc14ab4..ae265d917e6d380549386ba26d2db010ad0d21b4 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -31,9 +31,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the OpenVMS version for restricted tasking.
-
---  Blank line intentional so that it lines up exactly with default.
+--  This is the OpenVMS version for restricted tasking
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -200,4 +198,14 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 512;
+   --  This constant specifies the maximum number of characters to allow in an
+   --  exception message (see RM 11.4.1(18)). The value for VMS exceeds the
+   --  default minimum of 200 to allow for the length of chained VMS condition
+   --  handling messages.
+
 end System.Parameters;
index 5b41ab79ec6f158330757edab59880cf2f1eaab8..f90b5ba4faddf34edcd43237a51c4d85e4fbf13d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -31,8 +31,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the OpenVMS version.
---  Blank line intentional so that it lines up exactly with default.
+--  This is the OpenVMS version
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -199,4 +198,14 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 512;
+   --  This constant specifies the maximum number of characters to allow in an
+   --  exception message (see RM 11.4.1(18)). The value for VMS exceeds the
+   --  default minimum of 200 to allow for the length of chained VMS condition
+   --  handling messages.
+
 end System.Parameters;
index 774280f830773514691a68f2384e123786947132..93fb5aae0f4e880ad812182b432115593a91b2ce 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -31,7 +31,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the default VxWorks version of the package.`
+--  This is the default VxWorks version of the package`
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -200,4 +200,12 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 200;
+   --  This constant specifies the default number of characters to allow
+   --  in an exception message (200 is minimum required by RM 11.4.1(18)).
+
 end System.Parameters;
index 1e7fe650fad6c4ef7dffd903aa5f0b2fb36cec2a..8fdbd0025740ceffdf3e140d89f4ef967a631ca7 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005 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- --
@@ -31,8 +31,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the default version used for all systems for which no special
---  target-specific version of this package is provided.
+--  Default version used when no target-specific version is provided
 
 --  This package defines some system dependent parameters for GNAT. These
 --  are values that are referenced by the runtime library and are therefore
@@ -199,4 +198,12 @@ pragma Pure (Parameters);
    --  predefined output or not (True means that traces are output).
    --  See System.Traces for more details.
 
+   ------------------------------
+   -- Exception Message Length --
+   ------------------------------
+
+   Default_Exception_Msg_Max_Length : constant := 200;
+   --  This constant specifies the default number of characters to allow
+   --  in an exception message (200 is minimum required by RM 11.4.1(18)).
+
 end System.Parameters;