public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29835]  New: Error message of non-unknown edit descriptor needs improvement
@ 2006-11-14 18:01 burnus at gcc dot gnu dot org
  2006-11-14 18:01 ` [Bug fortran/29835] " burnus at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-14 18:01 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-22 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-14 18:01 [Bug fortran/29835] New: Error message of non-unknown edit descriptor needs improvement burnus at gcc dot gnu dot org
2006-11-14 18:01 ` [Bug fortran/29835] " burnus at gcc dot gnu dot org
2007-01-02  4:51 ` [Bug fortran/29835] Error message of unknown " jvdelisle at gcc dot gnu dot org
2007-09-08 20:16 ` jvdelisle at gcc dot gnu dot org
2008-07-22 17:07 ` domob at gcc dot gnu dot org
2008-07-22 17:11 ` domob at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).