From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31960 invoked by alias); 14 Nov 2006 18:01:37 -0000 Received: (qmail 31892 invoked by uid 48); 14 Nov 2006 18:01:22 -0000 Date: Tue, 14 Nov 2006 18:01:00 -0000 Subject: [Bug fortran/29835] New: Error message of non-unknown edit descriptor needs improvement X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg01310.txt.bz2 List-Id: 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