libgfortran patch for fortran PR 18653
Paul Brook
paul@codesourcery.com
Thu Dec 2 22:22:00 GMT 2004
On Thursday 02 December 2004 18:00, Steve Ellcey wrote:
> Would anyone care to comment on this idea:
>
> Change the open_external prototype from:
>
> stream *open_external (unit_action action, unit_status status);
> to:
> stream *open_external (unit_flags * flags, int default_action);
>
> This way I could initially set flags->action to ACTION_READWRITE in
> new_unit but if the user didn't really specify anything I would set
> default_action to true and that would tell open_external that it was OK
> to change flags->action to ACTION_READ or ACTION_WRITE if the initial
> open failed with ACTION_READWRITE. That way I don't need an
> ACTION_DEFAULT and I have a way to set action to what was actually used
> in the open command.
This seems the right general approach, although I don't see the need for the
default_action argument.
Why not just leave flags->action = ACTION_DEFAULT in new_unit, then have the
low-level open routine set it to whatever actually succeeded.
Paul
More information about the Fortran
mailing list