This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran,fortran] Fix PR27634 Handling missing period in format specifier
- From: Bernhard Fischer <rep dot nop at aon dot at>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Mon, 22 May 2006 09:53:47 +0200
- Subject: Re: [patch, libgfortran,fortran] Fix PR27634 Handling missing period in format specifier
- References: <44713E65.5000304@verizon.net>
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.