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, fortran] PR24268 whitespace in format strings. Revised


Jerry DeLisle wrote:
> OK to commit to main and 4.1 (after 24 hours)?
> 
> 2005-12-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
> 
> 	PR fortran/24268
> 	* io.c (format_lex): Allow whitespace within text of format specifier
> 	unless mode is free-form.

While trivial, this should still be accompanied by a testcase.  The same patch
is also needed in the preceding case, around line 210, probably it would be
better to make the number parsing code a static function.  One remark ...

> --- 233,240 ----
>              if (ISDIGIT (c))
>                value = 10 * value + c - '0';
>          }
> !       while (ISDIGIT (c) || (gfc_current_form == FORM_FIXED &&
> !                            gfc_is_whitespace(c)) );

The operator belongs on the continuation line, i.e.

!       while (ISDIGIT (c) || (gfc_current_form == FORM_FIXED
!                              && gfc_is_whitespace(c)) );

Thanks,
- Tobi


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