gfortran now warns for trailing characters in format statements. However, it does not properly work as the following test case (extracted from FLEUR, www.flapw.de) shows:
7182 FORMAT (a3) 1 Warning: Extraneous characters in format at (1) Due to committal: URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151021 Log: 2009-08-22 Bud Davis <bdavis9...@sbcglobal.net> PR fortran/28093 * io.c : added variable to store original len of fmt * io.c (check_format): Consume H items using next_char in both modes to handle consecutive single quotes. Test for extra characters in fmt, issue warning. Test case: SUBROUTINE rw_inp() CHARACTER(len=100) :: line READ(*,FMT="(4x,a)") line 7182 FORMAT (a3) 7130 FORMAT (i3) END SUBROUTINE rw_inp -- Summary: Spurious diagnostic "Extraneous characters in format" Product: gcc Version: 4.5.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=41152