aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-07-31 12:26:43 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-07-31 12:26:43 +0200
commita66495761c21febaa3b0f4d1ac22f5e3d414244b (patch)
tree23c27a0b4aecd76df9ce24dd5c7dd3659b819f30
parent5b960d36356cc3beb1a342594365130000076f19 (diff)
downloadgcc-a66495761c21febaa3b0f4d1ac22f5e3d414244b.zip
gcc-a66495761c21febaa3b0f4d1ac22f5e3d414244b.tar.gz
gcc-a66495761c21febaa3b0f4d1ac22f5e3d414244b.tar.bz2
s-direio.adb (Reset): Replace pragma Unmodified by Warnings (Off)...
* s-direio.adb (Reset): Replace pragma Unmodified by Warnings (Off), so that we can compile this file successfully with -gnatc. From-SVN: r138382
-rw-r--r--gcc/ada/s-direio.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/s-direio.adb b/gcc/ada/s-direio.adb
index c764a1c..8a6dd43 100644
--- a/gcc/ada/s-direio.adb
+++ b/gcc/ada/s-direio.adb
@@ -251,9 +251,12 @@ package body System.Direct_IO is
-----------
procedure Reset (File : in out File_Type; Mode : FCB.File_Mode) is
- pragma Unmodified (File);
+ pragma Warnings (Off, File);
-- File is actually modified via Unrestricted_Access below, but
-- GNAT will generate a warning anyway.
+ -- Note that we do not use pragma Unmodified here, since in -gnatc
+ -- mode, GNAT will complain that File is modified for
+ -- "File.Index := 1;"
begin
FIO.Reset (AP (File)'Unrestricted_Access, Mode);
@@ -262,9 +265,8 @@ package body System.Direct_IO is
end Reset;
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.
+ pragma Warnings (Off, File);
+ -- See above (other Reset procedure) for explanations on this pragma
begin
FIO.Reset (AP (File)'Unrestricted_Access);