This is the mail archive of the
mailing list for the GCC project.
Re: [patch, fortran]PR25829 Add support for F2003 I/O features
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: Jerry DeLisle <jvdelisle at verizon dot net>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Mar 2008 14:44:29 +0100
- Subject: Re: [patch, fortran]PR25829 Add support for F2003 I/O features
> - the matchers and checks for asynchronous, decimal, encoding,
> pending, round, sign, size, id for OPEN, READ, WRITE, and INQUIRE.
> - New WAIT statement.
Remarks regarding diagnostics in the front end
(Might go beyond your patch and might also regarding unimplemented
You should add checks which reject those with -std=f95: Both WAIT and
DECIMAL= etc. are accepted with -std=f95.
You should add checks for the arguments, the following is not rejected:
(They are checked for OPEN not for READ/WRITE)
The following is invalid. Asynchronous I/O is only allowed if io-unit is
a file-unit-number (C925):
character(10) :: aa
The following is rejected because the ID= is not recognized:
(It should be rejected since ID= is invalid for asynchronous='NO')
The following is invalid:
The reasons is that only formatted I/O (including namelists) are allowed
when DECIMAL=, BLANK= (blank is actually not recognized!), PAD=, SIGN=
or ROUND= appear. (C928).
this is rejected since DELIM= does not seem to be recognized, but the
example is also wrong: DELIM= is only valid for * or namelists.
> - implements the DECIMAL= feature.
It would be great if (e.g. in a follow up patch) you could also support
DP and DC:
write(*,'(DP,e12.4,DC,e12.4)') 1.2, 1.3
(currently, they are already rejected by the front end)
> - implements a do nothing stub for the WAIT statement.
(The Fortran 2003 permits the use of synchronous I/O thus this is OK; but
it should be in the release notes. Unless, your full implementation is
almost ready to go in.)
I'm inclined to having encoding=, round=, size= rejected with a not-
implemented message (e.g. using sorry() of toplev.h or eith gfc_error).
The rest looked ok, though I have only skimmed over the libgfortran