Hi Janne,

> the attached patch makes GFortran handle errno=EPERM in the same way
> as EACCES (this affects only when no ACTION= specifier is used in the
> OPEN statement and opening the file in read-write mode fails).

Makes sense.

> The patch also contains a doc snippet to explain how GFortran behaves
> when no ACTION= is given when opening a file.

Great.


> This brings me to a
> standards interpretation question: When no ACTION= is given, F2008
> 9.5.6.4 (ACCESS= specifier in OPEN statement) says: "If this specifier
> is omitted, the default value is processor dependent."  So does this
> mean that the current GFortran behavior is allowed, or must the
> behavior be exactly as with one of the possible ACTION= specifiers
> (READ, WRITE, READWRITE)?

I think we are standard-confirming: we open the file with one of the 
specifiers, determined in a processor-dependent fashion. Except our 
process-dependent value is not a constant, it depends on the file chosen (and 
its permissions). I believe that’s still within “processor dependent”. And it 
certainly makes more sense that the other possibilities.


Thus, OK to commit.

FX

Reply via email to