aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput.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/sinput.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/sinput.adb')
-rw-r--r--gcc/ada/sinput.adb12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index fccbacf..8e80213 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_Conversion;
with Ada.Unchecked_Deallocation;
-with Unchecked_Conversion;
package body Sinput is
@@ -56,16 +56,16 @@ package body Sinput is
-- used to construct improperly aliased pointer values.
function To_Address is
- new Unchecked_Conversion (Lines_Table_Ptr, Address);
+ new Ada.Unchecked_Conversion (Lines_Table_Ptr, Address);
function To_Address is
- new Unchecked_Conversion (Logical_Lines_Table_Ptr, Address);
+ new Ada.Unchecked_Conversion (Logical_Lines_Table_Ptr, Address);
function To_Pointer is
- new Unchecked_Conversion (Address, Lines_Table_Ptr);
+ new Ada.Unchecked_Conversion (Address, Lines_Table_Ptr);
function To_Pointer is
- new Unchecked_Conversion (Address, Logical_Lines_Table_Ptr);
+ new Ada.Unchecked_Conversion (Address, Logical_Lines_Table_Ptr);
pragma Warnings (On);
@@ -378,7 +378,7 @@ package body Sinput is
-- to first Unchecked_Convert to access-to-variable.
function To_Source_Buffer_Ptr_Var is new
- Unchecked_Conversion (Source_Buffer_Ptr, Source_Buffer_Ptr_Var);
+ Ada.Unchecked_Conversion (Source_Buffer_Ptr, Source_Buffer_Ptr_Var);
Temp : Source_Buffer_Ptr_Var := To_Source_Buffer_Ptr_Var (Src);