This patch does a bit of cleanup in System.Address_To_Access_Conversions. No
change in behavior; no test.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-05-15  Bob Duff  <d...@adacore.com>

        * s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
        with pragma No_Body.
        (Xyz): Remove Xyz, which is apparently unnecessary.

Index: s-atacco.adb
===================================================================
--- s-atacco.adb        (revision 187501)
+++ s-atacco.adb        (working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2009 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- --
@@ -29,10 +29,8 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is a dummy version of this package that is needed to solve bootstrap
---  problems when compiling a library that doesn't require s-atacco.adb from
---  a compiler that contains one.
+--  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.
 
-package body System.Address_To_Access_Conversions is
-
-end System.Address_To_Access_Conversions;
+pragma No_Body;
Index: s-atacco.ads
===================================================================
--- s-atacco.ads        (revision 187501)
+++ s-atacco.ads        (working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2009, 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 --
@@ -38,24 +38,12 @@
 
 package System.Address_To_Access_Conversions is
    pragma Preelaborate;
-   pragma Elaborate_Body;
-   --  This pragma Elaborate_Body is there to ensure the requirement of what is
-   --  at the moment a dummy null body. The reason this null body is there is
-   --  that we used to have a real body, and it causes bootstrap problems with
-   --  old compilers if we try to remove the corresponding file.
 
    pragma Compile_Time_Warning
      (Object'Unconstrained_Array,
       "Object is unconstrained array type" & ASCII.LF &
       "To_Pointer results may not have bounds");
 
-   --  Capture constrained status, suppressing warnings, since this is
-   --  an obsolescent feature to use Constrained in this way (RM J.4).
-
-   pragma Warnings (Off);
-   Xyz : Boolean := Object'Constrained;
-   pragma Warnings (On);
-
    type Object_Pointer is access all Object;
    for Object_Pointer'Size use Standard'Address_Size;
 

Reply via email to