diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-27 14:36:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-27 14:36:04 +0200 |
commit | 0773617140ab3b8f4192a52bff59deecbacbbcfe (patch) | |
tree | 7bff056ed9afc6c3fd50f07b87233416531a31d4 /gcc | |
parent | d5c998a9fe701baceed08b46c07844bf5990ee1f (diff) | |
download | gcc-0773617140ab3b8f4192a52bff59deecbacbbcfe.zip gcc-0773617140ab3b8f4192a52bff59deecbacbbcfe.tar.gz gcc-0773617140ab3b8f4192a52bff59deecbacbbcfe.tar.bz2 |
a-ststio.adb, [...]: Further code clean up of previous change.
* a-ststio.adb, s-direio.adb: Further code clean up of previous change.
Update comments.
From-SVN: r136023
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/a-ststio.adb | 15 | ||||
-rw-r--r-- | gcc/ada/s-direio.adb | 6 |
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; |