diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-10-24 10:47:09 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-11-12 14:00:49 +0100 |
commit | 5f230267d241a199a6826c9c61f4e9b0a389c29b (patch) | |
tree | 7cf6fb71767abe7a417b36698bf9c67f31141bfa /gcc/ada/doc/gnat_rm | |
parent | 9bba882f922e69abc72fa71520be649258cfd856 (diff) | |
download | gcc-5f230267d241a199a6826c9c61f4e9b0a389c29b.zip gcc-5f230267d241a199a6826c9c61f4e9b0a389c29b.tar.gz gcc-5f230267d241a199a6826c9c61f4e9b0a389c29b.tar.bz2 |
ada: Detect sharing of external file in inconsistent read-write modes
When opening files with "shared=yes", as described in GNAT RM 11.10,
Sharing Files, we now prevent sharing a single file in inconsistent
read-write modes.
gcc/ada/ChangeLog:
* doc/gnat_rm/the_implementation_of_standard_i_o.rst
(Shared Files): Add trailing period.
* libgnat/s-ficobl.ads (AFCB): Reflect new behavior in comment.
* libgnat/s-fileio.adb (Open): Detect inconsistent sharing,
just like we do in System.File_IO.Reset.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc/gnat_rm')
-rw-r--r-- | gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst b/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst index f6d884d..fff9bbf 100644 --- a/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst +++ b/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst @@ -894,7 +894,7 @@ One common use of file sharing in Ada 83 is the use of instantiations of Sequential_IO on the same file with different types, to achieve heterogeneous input-output. Although this approach will work in GNAT if ``shared=yes`` is specified, it is preferable in Ada to use Stream_IO -for this purpose (using the stream attributes) +for this purpose (using the stream attributes). .. _Filenames_encoding: |