diff options
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index b3084775ff1..c6abba09bbf 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -73,12 +73,13 @@ package body System.File_IO is -- Points to list of names of temporary files. Note that this global -- variable must be properly protected to provide thread safety. - type File_IO_Clean_Up_Type is new Controlled with null record; + type File_IO_Clean_Up_Type is new Limited_Controlled with null record; -- The closing of all open files and deletion of temporary files is an - -- action which takes place at the end of execution of the main program. - -- This action can be implemented using a library level object which - -- gets finalized at the end of the main program execution. The above is - -- a controlled type introduced for this purpose. + -- action that takes place at the end of execution of the main program. + -- This action is implemented using a library level object which gets + -- finalized at the end of program execution. Note that the type is + -- limited, in order to stop the compiler optimizing away the declaration + -- which would be allowed in the non-limited case. procedure Finalize (V : in out File_IO_Clean_Up_Type); -- This is the finalize operation that is used to do the cleanup |