[Bug fortran/29835] New: Error message of non-unknown edit descriptor needs improvement
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Nov 14 18:01:00 GMT 2006
gfortran writes:
read(1,'(Q,A)',iostat=i) n,line(:n)
1
Warning: Unexpected element in format string at (1)
And if there is a long comment it may even look like:
XLINE
1
Warning: Unexpected element in format string at (1)
Expected:
read(1,'(Q,A)',iostat=i) n,line(:n)
1
Warning: Unexpected element in format string at (1)
or even:
Warning: Unexpected element 'Q' in format string at (1)
(The run-time message is also slightly misaligned:
read(1,'(Q,A)') n,line(:n)
1
---------- Test program ---------
integer, parameter :: MAXLINE = 255
character(MAXLINE) line
open(1,file='whatever', access='sequential',form='formatted',action='read')
do
read(1,'(Q,A)',iostat=i) n,line(:n)
if (i/=0) exit
! real work here
enddo
end
---------- Test program ---------
Cf.
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/d968667b1e3219ab
* * *
The Q edit descriptor is, e.g., described at
http://www.helsinki.fi/atk/unix/dec_manuals/cf77au/olrm0242.htm
It is documented but not supported in g77, seems to be a DEC extension and is
supported by ifort and sunf95.
I think, gfortran does not need to support it.
--
Summary: Error message of non-unknown edit descriptor needs
improvement
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29835
More information about the Gcc-bugs
mailing list