This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] PR35754 -std=f95: Reject "1P2E12.4" w/o a comma after the "P"


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]