aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/a-ststio.adb15
-rw-r--r--gcc/ada/s-direio.adb6
2 files changed, 9 insertions, 12 deletions
diff --git a/gcc/ada/a-ststio.adb b/gcc/ada/a-ststio.adb
index fd5e39a..9c3bd31 100644
--- a/gcc/ada/a-ststio.adb
+++ b/gcc/ada/a-ststio.adb
@@ -101,11 +101,8 @@ package body Ada.Streams.Stream_IO is
-----------
procedure Close (File : in out File_Type) is
- AFCB : aliased AP;
- for AFCB'Address use File'Address;
- pragma Import (Ada, AFCB);
begin
- FIO.Close (AFCB'Access);
+ FIO.Close (AP (File)'Unrestricted_Access);
end Close;
------------
@@ -140,11 +137,8 @@ package body Ada.Streams.Stream_IO is
------------
procedure Delete (File : in out File_Type) is
- AFCB : aliased AP;
- for AFCB'Address use File'Address;
- pragma Import (Ada, AFCB);
begin
- FIO.Delete (AFCB'Access);
+ FIO.Delete (AP (File)'Unrestricted_Access);
end Delete;
-----------------
@@ -357,9 +351,6 @@ package body Ada.Streams.Stream_IO is
--------------
procedure Set_Mode (File : in out File_Type; Mode : File_Mode) is
- AFCB : aliased AP;
- for AFCB'Address use File'Address;
- pragma Import (Ada, AFCB);
begin
FIO.Check_File_Open (AP (File));
@@ -371,7 +362,7 @@ package body Ada.Streams.Stream_IO is
if ((File.Mode = FCB.In_File) /= (Mode = In_File))
and then not File.Update_Mode
then
- FIO.Reset (AFCB'Access, FCB.Inout_File);
+ FIO.Reset (AP (File)'Unrestricted_Access, FCB.Inout_File);
File.Update_Mode := True;
end if;
diff --git a/gcc/ada/s-direio.adb b/gcc/ada/s-direio.adb
index 328051c..c764a1c 100644
--- a/gcc/ada/s-direio.adb
+++ b/gcc/ada/s-direio.adb
@@ -252,6 +252,9 @@ package body System.Direct_IO is
procedure Reset (File : in out File_Type; Mode : FCB.File_Mode) is
pragma Unmodified (File);
+ -- File is actually modified via Unrestricted_Access below, but
+ -- GNAT will generate a warning anyway.
+
begin
FIO.Reset (AP (File)'Unrestricted_Access, Mode);
File.Index := 1;
@@ -260,6 +263,9 @@ package body System.Direct_IO is
procedure Reset (File : in out File_Type) is
pragma Unmodified (File);
+ -- File is actually modified via Unrestricted_Access below, but
+ -- GNAT will generate a warning anyway.
+
begin
FIO.Reset (AP (File)'Unrestricted_Access);
File.Index := 1;