]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Small cleanup in System.Exceptions
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 17 Feb 2021 07:55:15 +0000 (08:55 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Jun 2021 08:42:57 +0000 (04:42 -0400)
gcc/ada/

* libgnat/s-except.ads (ZCX_By_Default): Delete.
(Require_Body): Likewise.
* libgnat/s-except.adb: Replace body with pragma No_Body.

gcc/ada/libgnat/s-except.adb
gcc/ada/libgnat/s-except.ads

index 4b874ca787c9bc21dc474456a1b6de05cb0a0484..fa220b32b91a3336ba5803d68b2e7c04460248dd 100644 (file)
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This package does not require a body, since it is a package renaming. We
---  provide a dummy file containing a No_Body pragma so that previous versions
---  of the body (which did exist) will not interfere.
-
---  pragma No_Body;
-
---  The above pragma is commented out, since for now we can't use No_Body in
---  a unit marked as a Compiler_Unit, since this requires GNAT 6.1, and we
---  do not yet require this for bootstrapping. So instead we use a dummy Taft
---  amendment type to require the body:
-
-package body System.Exceptions is
-   type Require_Body is new Integer;
-end System.Exceptions;
+pragma No_Body;
index ae037ba417958dd47a88939de9073763091ab1cd..10448bce1e121607436559b4bf2c0f7450004f98 100644 (file)
@@ -34,30 +34,10 @@ pragma Compiler_Unit_Warning;
 package System.Exceptions is
 
    pragma Preelaborate;
-   --  To let Ada.Exceptions "with" us and let us "with" Standard_Library
-
-   ZCX_By_Default : constant Boolean;
-   --  Visible copy to allow Ada.Exceptions to know the exception model
+   --  To let Ada.Exceptions "with" us
 
 private
 
-   type Require_Body;
-   --  Dummy Taft-amendment type to make it legal (and required) to provide
-   --  a body for this package.
-   --
-   --  We do this because this unit used to have a body in earlier versions
-   --  of GNAT, and it causes various bootstrap path problems etc if we remove
-   --  a body, since we may pick up old unwanted bodies.
-   --
-   --  Note: we use this standard Ada method of requiring a body rather
-   --  than the cleaner pragma No_Body because System.Exceptions is a compiler
-   --  unit, and older bootstrap compilers do not support pragma No_Body. This
-   --  type can be removed, and s-except.adb can be replaced by a source
-   --  containing just that pragma, when we decide to move to a 2008 compiler
-   --  as the minimal bootstrap compiler version. ???
-
-   ZCX_By_Default : constant Boolean := System.ZCX_By_Default;
-
    Foreign_Exception : exception;
    pragma Unreferenced (Foreign_Exception);
    --  This hidden exception is used to represent non-Ada exception to