aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/atree.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/atree.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/atree.adb')
-rw-r--r--gcc/ada/atree.adb24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index 08e3667..a949761 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -23,6 +23,7 @@
-- --
------------------------------------------------------------------------------
+with Ada.Unchecked_Conversion;
with Aspects; use Aspects;
with Debug; use Debug;
with Namet; use Namet;
@@ -31,7 +32,6 @@ with Opt; use Opt;
with Output; use Output;
with Sinfo.Utils; use Sinfo.Utils;
with System.Storage_Elements;
-with Unchecked_Conversion;
package body Atree is
@@ -505,7 +505,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 1);
function Cast is new
- Unchecked_Conversion (Field_Size_1_Bit, Field_Type);
+ Ada.Unchecked_Conversion (Field_Size_1_Bit, Field_Type);
Val : constant Field_Size_1_Bit := Get_1_Bit_Val (N, Offset);
begin
return Cast (Val);
@@ -517,7 +517,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 2);
function Cast is new
- Unchecked_Conversion (Field_Size_2_Bit, Field_Type);
+ Ada.Unchecked_Conversion (Field_Size_2_Bit, Field_Type);
Val : constant Field_Size_2_Bit := Get_2_Bit_Val (N, Offset);
begin
return Cast (Val);
@@ -529,7 +529,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 4);
function Cast is new
- Unchecked_Conversion (Field_Size_4_Bit, Field_Type);
+ Ada.Unchecked_Conversion (Field_Size_4_Bit, Field_Type);
Val : constant Field_Size_4_Bit := Get_4_Bit_Val (N, Offset);
begin
return Cast (Val);
@@ -541,7 +541,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 8);
function Cast is new
- Unchecked_Conversion (Field_Size_8_Bit, Field_Type);
+ Ada.Unchecked_Conversion (Field_Size_8_Bit, Field_Type);
Val : constant Field_Size_8_Bit := Get_8_Bit_Val (N, Offset);
begin
return Cast (Val);
@@ -553,7 +553,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 32);
function Cast is new
- Unchecked_Conversion (Field_Size_32_Bit, Field_Type);
+ Ada.Unchecked_Conversion (Field_Size_32_Bit, Field_Type);
Val : constant Field_Size_32_Bit := Get_32_Bit_Val (N, Offset);
Result : constant Field_Type := Cast (Val);
@@ -605,7 +605,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 1);
function Cast is new
- Unchecked_Conversion (Field_Type, Field_Size_1_Bit);
+ Ada.Unchecked_Conversion (Field_Type, Field_Size_1_Bit);
begin
Set_1_Bit_Val (N, Offset, Cast (Val));
end Set_1_Bit_Field;
@@ -616,7 +616,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 2);
function Cast is new
- Unchecked_Conversion (Field_Type, Field_Size_2_Bit);
+ Ada.Unchecked_Conversion (Field_Type, Field_Size_2_Bit);
begin
Set_2_Bit_Val (N, Offset, Cast (Val));
end Set_2_Bit_Field;
@@ -627,7 +627,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 4);
function Cast is new
- Unchecked_Conversion (Field_Type, Field_Size_4_Bit);
+ Ada.Unchecked_Conversion (Field_Type, Field_Size_4_Bit);
begin
Set_4_Bit_Val (N, Offset, Cast (Val));
end Set_4_Bit_Field;
@@ -638,7 +638,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 8);
function Cast is new
- Unchecked_Conversion (Field_Type, Field_Size_8_Bit);
+ Ada.Unchecked_Conversion (Field_Type, Field_Size_8_Bit);
begin
Set_8_Bit_Val (N, Offset, Cast (Val));
end Set_8_Bit_Field;
@@ -649,7 +649,7 @@ package body Atree is
pragma Assert (Field_Type'Size = 32);
function Cast is new
- Unchecked_Conversion (Field_Type, Field_Size_32_Bit);
+ Ada.Unchecked_Conversion (Field_Type, Field_Size_32_Bit);
begin
Set_32_Bit_Val (N, Offset, Cast (Val));
end Set_32_Bit_Field;
@@ -854,7 +854,7 @@ package body Atree is
----------------------
procedure Print_Atree_Info (N : Node_Or_Entity_Id) is
- function Cast is new Unchecked_Conversion (Slot, Int);
+ function Cast is new Ada.Unchecked_Conversion (Slot, Int);
begin
Write_Int (Int (Size_In_Slots (N)));
Write_Str (" slots (");