This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] PR35754 -std=f95: Reject "1P2E12.4" w/o a comma after the "P"
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Aug 2009 21:45:17 -0700
- Subject: Re: [patch, fortran] PR35754 -std=f95: Reject "1P2E12.4" w/o a comma after the "P"
- References: <4A919789.6010201@verizon.net> <4A9199BF.1040008@net-b.de>
On 08/23/2009 12:34 PM, Tobias Burnus wrote:
Jerry DeLisle wrote:
The attached patch fixes the diagnostics for the subject case and adds
checks for the acceptable format specifiers after a P without a comma.
I will be looking into the runtime side of these fixes after this is
committed.
Regression tested on x86-64 Linux. Test case included.
OK for trunk.
OK. In my opinion, a run-time check is not really needed.
Thanks for the patch!
Tobias
2009-08-23 Jerry DeLisle<jvdelisle@gcc.gnu.org>
PR fortran/35754
* io.c (check_format): Add checks for comma and the allowed
format specifiers after the 'P' specifier.
$ svn commit ChangeLog io.c
Sending ChangeLog
Sending io.c
Transmitting file data ..
Committed revision 151045.
Committed with the following additional changes. The locus adjustment
is done at the end of the function and that error message has an
implicit %L (a typo). There is some more cleanup to do, stay tuned.
@@ -883,13 +898,13 @@
if (t != FMT_PERIOD)
{
/* Warn if -std=legacy, otherwise error. */
- if (mode != MODE_FORMAT)
- format_locus.nextc += format_string_pos;
if (gfc_option.warn_std != 0)
{
- error = _("Period required in format specifier at %L");
+ error = _("Period required in format specifier");
goto syntax;
}
+ if (mode != MODE_FORMAT)
+ format_locus.nextc += format_string_pos;
gfc_warning ("Period required in format specifier at %L",
&format_locus);
saved_token = t;