diff options
author | Thomas Quinot <quinot@adacore.com> | 2008-05-27 12:14:25 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-27 12:14:25 +0200 |
commit | e2baae4e1c8be8158233435d500f288a786a1121 (patch) | |
tree | f8477ecfb2c883ca1bd8ae86692e823bda30959f /gcc/ada/a-textio.ads | |
parent | ab8bfb6497bde60fdaa99b684e499e4748cffe49 (diff) | |
download | gcc-e2baae4e1c8be8158233435d500f288a786a1121.zip gcc-e2baae4e1c8be8158233435d500f288a786a1121.tar.gz gcc-e2baae4e1c8be8158233435d500f288a786a1121.tar.bz2 |
(System.File_IO.{Close, Delete, Reset}): Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr".
2008-05-27 Thomas Quinot <quinot@adacore.com>
(System.File_IO.{Close, Delete, Reset}):
Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr".
(Ada.*_IO.{Close, Delete, Reset, Set_Mode}):
Pass File parameter by reference.
From-SVN: r136002
Diffstat (limited to 'gcc/ada/a-textio.ads')
-rw-r--r-- | gcc/ada/a-textio.ads | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ada/a-textio.ads b/gcc/ada/a-textio.ads index 45f422f..35cb516 100644 --- a/gcc/ada/a-textio.ads +++ b/gcc/ada/a-textio.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -301,6 +301,32 @@ package Ada.Text_IO is Layout_Error : exception renames IO_Exceptions.Layout_Error; private + + -- The following procedures have a File_Type formal of mode IN OUT because + -- they may close the original file. The Close operation may raise an + -- exception, but in that case we want any assignment to the formal to + -- be effective anyway, so it must be passed by reference (or the caller + -- will be left with a dangling pointer). + + pragma Export_Procedure + (Internal => Close, + External => "", + Mechanism => Reference); + pragma Export_Procedure + (Internal => Delete, + External => "", + Mechanism => Reference); + pragma Export_Procedure + (Internal => Reset, + External => "", + Parameter_Types => (File_Type), + Mechanism => Reference); + pragma Export_Procedure + (Internal => Reset, + External => "", + Parameter_Types => (File_Type, File_Mode), + Mechanism => (File => Reference)); + ----------------------------------- -- Handling of Format Characters -- ----------------------------------- |