[patch, fortran] PR37746 Diagnostic of edit descriptors, esp. EN

Jerry DeLisle jvdelisle@verizon.net
Sat Aug 22 21:11:00 GMT 2009


Greetings,

The attached patch greatly improves the diagnostics for D, G, E, EN, ES 
format specifiers.  I added a simple helper function to convert the 
token to a string that can be used in error messages.

I also found that we were completely missing a check for the required 
format width.  This is now added in with the patch.  The overall error 
locus was improved by the patch to 41075.

Regression tested on X86-64 Linux.  Test case attached.

OK for trunk.

Regards,

Jerry

2009-08-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

     PR fortran/37446
     * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
     (format_lex): Likewise.
     (token_to_string): New function.
     (check_format): Use the new tokens and the new function. Add
     check for positive width.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr37746.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090822/11e6080b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fmt_error_7.f
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090822/11e6080b/attachment-0001.ksh>


More information about the Gcc-patches mailing list