This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: F2003's IOMSG feature and Janne's FLUSH patch
On Sat, Jul 30, 2005 at 09:36:30PM +0100, Paul Brook wrote:
> On Saturday 30 July 2005 20:47, Steve Kargl wrote:
> > I've finally found some time to review Janne's implementation
> > of the F2003 flush command. In expanding Janne's testcase to
> > cover ERR=, I came across IOMSG= in the draft of the F2003 standard.
> > gfortran does not support IOMSG. So I have 2 questions.
> >
> > (1) Should we implement IOMSG before committing Janne's patch?
> >
> > (2) Can I commit Janne's patch with an appropriate TODO comment?
>
> I don't mind incomplete implementations, provided:
> - They as commented as such
I'll add comments. I'll also document the behavior in
gfortran.info.
> - The missing bits can be implemented without having to redo the work of the
> original patch.
I think this is the case. AFAICT, IOMSG would be a clone of IOSTAT
with the integer codes replaced by a message catalog. If I have
time I'll look into this. Note, IOMSG is needed for all data transfer
statements in Fortran 2003.
> - We never generate incorrect code because of the missing features. Refusing
> to compile anything is better than getting some cases wrong.
>
> My preference would be that the compiler call sorry() or gfc_todo() if it
> encounter things that aren't supported.
At the moment we get
In file flush_1.f90:29
flush(unit=10, iomsg=msg)
1
Error: Syntax error in FLUSH statement at (1)
Is this sufficient?
--
Steve