This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, libgfortran,fortran] Fix PR27634 Handling missing period in format specifier


On Sun, May 21, 2006 at 09:30:29PM -0700, Jerry DeLisle wrote:
>:ADDPATCH fortran:
>
>The attached patch allows a missing period in a real format specifier, 
>interpreting it as 0 decimal places.  At compile time a warning is given in 
>all cases (unless -w is given) except -std=f95.  -std=f95 gives a compile 
>time error, regardless.

I may misread your patch, but..

>Index: gcc/fortran/io.c
>===================================================================
>*** gcc/fortran/io.c	(revision 113949)
>--- gcc/fortran/io.c	(working copy)
>*************** static try
>*** 413,419 ****
>  check_format (void)
>  {
>    const char *posint_required	  = _("Positive width required");
>-   const char *period_required	  = _("Period required");

..here you remove period_required.
[]
>Index: libgfortran/io/format.c
>===================================================================
>*** libgfortran/io/format.c	(revision 113949)
>--- libgfortran/io/format.c	(working copy)
>*************** parse_format_list (st_parameter_dt *dtp)
>*** 725,732 ****
>        t = format_lex (fmt);
>        if (t != FMT_PERIOD)
>  	{
>! 	  fmt->error = period_required;
>! 	  goto finished;
>  	}
>  
>        t = format_lex (fmt);
>--- 725,736 ----
>        t = format_lex (fmt);
>        if (t != FMT_PERIOD)
>  	{
>! 	  /* We treat missing decimal descriptor as 0.  
>! 	     Warn on -pedantic.  */
>! 	  fmt->saved_token = t;
>! 	  tail->u.real.d = 0;
>! 	  notify_std (GFC_STD_GNU, period_required);

Where is this occurance defined? --^

Just curious.


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