aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/types.ads
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/types.ads
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/types.ads')
-rw-r--r--gcc/ada/types.ads7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index a44aa13..de14bf7 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -39,9 +39,9 @@
-- 2s-complement. If there are any machines for which this is not a correct
-- assumption, a significant number of changes will be required.
+with Ada.Unchecked_Deallocation;
with System;
with Unchecked_Conversion;
-with Unchecked_Deallocation;
package Types is
pragma Preelaborate;
@@ -117,7 +117,7 @@ package Types is
type String_Ptr_Const is access constant String;
-- Standard character and string pointers
- procedure Free is new Unchecked_Deallocation (String, String_Ptr);
+ procedure Free is new Ada.Unchecked_Deallocation (String, String_Ptr);
-- Procedure for freeing dynamically allocated String values
subtype Big_String is String (Positive);
@@ -155,7 +155,8 @@ package Types is
-- Text buffers for input files are allocated dynamically and this type
-- is used to reference these text buffers.
- procedure Free is new Unchecked_Deallocation (Text_Buffer, Text_Buffer_Ptr);
+ procedure Free is
+ new Ada.Unchecked_Deallocation (Text_Buffer, Text_Buffer_Ptr);
-- Procedure for freeing dynamically allocated text buffers
------------------------------------------