aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gen_il-gen.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-02-09 22:32:19 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-13 08:04:30 +0000
commit83bacaa9b5d8b652f311633ca9584ea56cd71d86 (patch)
treeafbcec35ce9fd431e99c4e94e616b785dd199f56 /gcc/ada/gen_il-gen.adb
parentcb50998584eda9bbd3377d3dca6a8d264d6c4891 (diff)
downloadgcc-83bacaa9b5d8b652f311633ca9584ea56cd71d86.zip
gcc-83bacaa9b5d8b652f311633ca9584ea56cd71d86.tar.gz
gcc-83bacaa9b5d8b652f311633ca9584ea56cd71d86.tar.bz2
[Ada] Remove obsolete uses of Unchecked_Conversion from Ada 83
Similar to a recent removal of obsolete uses of Unchecked_Deallocation. In Ada 83 the Unchecked_Conversion was a top-level unit; since Ada 95 it is an obsolete renaming of Ada.Unchecked_Conversion. GNAT doesn't warn yet about uses of these obsolete renamings, but it still seems better to avoid them. gcc/ada/ * atree.adb, gen_il-gen.adb, osint.adb, set_targ.adb, sinput.adb, table.adb, treepr.adb, types.ads: Replace uses of Unchecked_Conversion in the compiler itself. * libgnarl/a-reatim.adb, libgnarl/s-osinte__gnu.ads, libgnarl/s-osinte__kfreebsd-gnu.ads, libgnat/a-coboho.adb, libgnat/a-stuten.ads, libgnat/s-putima.adb: Likewise in the runtime. * doc/gnat_ugn/gnat_and_program_execution.rst: Likewise in documentation. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/gen_il-gen.adb')
-rw-r--r--gcc/ada/gen_il-gen.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
index adf363b..0ecc696 100644
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -1425,7 +1425,7 @@ package body Gen_IL.Gen is
(S : in out Sink; T : Type_Enum)
is
Pre : constant String :=
- "function Cast is new Unchecked_Conversion (";
+ "function Cast is new Ada.Unchecked_Conversion (";
Lo_Type : constant String := "Field_Size_" & Image (Field_Size (T)) & "_Bit";
Hi_Type : constant String := Get_Set_Id_Image (T);
begin
@@ -2338,7 +2338,7 @@ package body Gen_IL.Gen is
Decrease_Indent (S, 3);
Put (S, LF & "end Sinfo.Nodes;" & LF);
- Put (B, "with Unchecked_Conversion;" & LF);
+ Put (B, "with Ada.Unchecked_Conversion;" & LF);
Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;" & LF);
Put (B, "with Nlists; use Nlists;" & LF);
Put (B, "pragma Warnings (Off);" & LF);
@@ -2394,7 +2394,7 @@ package body Gen_IL.Gen is
Decrease_Indent (S, 3);
Put (S, LF & "end Einfo.Entities;" & LF);
- Put (B, "with Unchecked_Conversion;" & LF);
+ Put (B, "with Ada.Unchecked_Conversion;" & LF);
Put (B, "with Atree; use Atree; use Atree.Atree_Private_Part;" & LF);
Put (B, "with Einfo.Utils; use Einfo.Utils;" & LF);
-- This forms a cycle between packages (via bodies, which is OK)