aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-02-09 13:01:11 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-13 08:04:29 +0000
commitcb50998584eda9bbd3377d3dca6a8d264d6c4891 (patch)
treee871f1069b53f814929873605f0f52d0ae3055b6 /gcc/ada/sinput.adb
parent84f20139792e97f9fb6e10918e271c3277d0f178 (diff)
downloadgcc-cb50998584eda9bbd3377d3dca6a8d264d6c4891.zip
gcc-cb50998584eda9bbd3377d3dca6a8d264d6c4891.tar.gz
gcc-cb50998584eda9bbd3377d3dca6a8d264d6c4891.tar.bz2
[Ada] Remove obsolete uses of Unchecked_Deallocation from Ada 83
In Ada 83 the Unchecked_Deallocation was a top-level unit; since Ada 95 it is an obsolete renaming of Ada.Unchecked_Deallocation. GNAT doesn't yet warn about uses of these obsolete renamings, but it still seems better to avoid them. Cleanup before adding a new instance of Unchecked_Deallocation. Offending occurrences found with grep. gcc/ada/ * butil.adb, sem.adb, sinput.adb, types.ads, xref_lib.adb: Replace uses of Unchecked_Deallocation with Ada.Unchecked_Deallocation. * doc/gnat_ugn/gnat_and_program_execution.rst: Likewise for the documentation; fix casing of GNAT.IO. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/sinput.adb')
-rw-r--r--gcc/ada/sinput.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index ccc4a7a..fccbacf 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -41,8 +41,8 @@ with System.Storage_Elements;
with System.Memory;
with System.WCh_Con; use System.WCh_Con;
+with Ada.Unchecked_Deallocation;
with Unchecked_Conversion;
-with Unchecked_Deallocation;
package body Sinput is
@@ -319,10 +319,10 @@ package body Sinput is
-- Clear_Source_File_Table --
-----------------------------
- procedure Free is new Unchecked_Deallocation
+ procedure Free is new Ada.Unchecked_Deallocation
(Lines_Table_Type, Lines_Table_Ptr);
- procedure Free is new Unchecked_Deallocation
+ procedure Free is new Ada.Unchecked_Deallocation
(Logical_Lines_Table_Type, Logical_Lines_Table_Ptr);
procedure Clear_Source_File_Table is
@@ -383,7 +383,7 @@ package body Sinput is
Temp : Source_Buffer_Ptr_Var := To_Source_Buffer_Ptr_Var (Src);
procedure Free_Ptr is new
- Unchecked_Deallocation (Source_Buffer, Source_Buffer_Ptr_Var);
+ Ada.Unchecked_Deallocation (Source_Buffer, Source_Buffer_Ptr_Var);
begin
Free_Ptr (Temp);
Src := null;
@@ -922,7 +922,7 @@ package body Sinput is
pragma Import (Ada, Dope);
use System.Storage_Elements;
for Dope'Address use Src + System.Address'Size / 8;
- procedure Free is new Unchecked_Deallocation (Dope_Rec, Dope_Ptr);
+ procedure Free is new Ada.Unchecked_Deallocation (Dope_Rec, Dope_Ptr);
begin
Free (Dope);
end Free_Dope;