libgfortran patch for fortran PR 18653

Steve Ellcey sje@cup.hp.com
Thu Dec 2 23:20:00 GMT 2004


> From: Paul Brook <paul@codesourcery.com>
> 
> 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.

I guess my main concern with this is the question of whether or not
different systems might want different behaviour from
ACTION_UNSPECIFIED.

If one system wants ACTION_READWRITE to be the default and another wants
ACTION_READ as the default then it seems like new_unit() is a more
natural place to set that default based on some ifdef then to handle it
in regular_file() down in unix.c.

If we think ACTION_READWRITE should be the default for all gfortran
compilers (regardless of what system it is on) then I think you are
right we should just leave flags->action as ACTION_UNSPECIFIED and
handle it down in external_file/regular_file, resetting flags->action as
apppropriate.

Steve Ellcey
sje@cup.hp.com



More information about the Fortran mailing list