From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22738 invoked by alias); 22 Jul 2008 17:07:23 -0000 Received: (qmail 11612 invoked by alias); 22 Jul 2008 17:06:40 -0000 Date: Tue, 22 Jul 2008 17:07:00 -0000 Message-ID: <20080722170640.11611.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29835] Error message of unknown edit descriptor needs improvement In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "domob at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg01735.txt.bz2 ------- Comment #2 from domob at gcc dot gnu dot org 2008-07-22 17:06 ------- Subject: Bug 29835 Author: domob Date: Tue Jul 22 17:05:55 2008 New Revision: 138063 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138063 Log: 2008-07-22 Daniel Kraft PR fortran/29835 * io.c (error_element), (format_locus): New static globals. (unexpected_element): Spelled out this message fully. (next_char): Keep track of locus when not MODE_STRING. (next_char_not_space): Remember last parsed element in error_element. (format_lex): Fix two indentation errors. (check_format): Use format_locus and possibly error_element for a slightly better error message on invalid format. (check_format_string): Set format_locus to start of the string expression used as format. 2008-07-22 Daniel Kraft PR fortran/29835 * io/format.c (struct format_data): New member error_element. (unexpected_element): Added '%c' to message. (next_char): Keep track of last parsed character in fmt->error_element. (format_error): If the message is unexpected_element, output the offending character, too. 2008-07-22 Daniel Kraft PR fortran/29835 * gfortran.dg/fmt_error_3.f90: New test. * gfortran.dg/fmt_error_4.f90: New test. * gfortran.dg/fmt_error_5.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/fmt_error_3.f90 trunk/gcc/testsuite/gfortran.dg/fmt_error_4.f90 trunk/gcc/testsuite/gfortran.dg/fmt_error_5.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/io.c trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/io/format.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29835