*ping* Re: [PATCH] PR fortran/89103 - Allow blank format items in format strings

Mark Eggleston mark.eggleston@codethink.co.uk
Tue Jun 11 09:31:00 GMT 2019


On 10/06/2019 15:10, Mark Eggleston wrote:
>
> On 10/06/2019 15:07, Thomas Koenig wrote:
>> Am 10.06.19 um 15:33 schrieb Mark Eggleston:
>>> This patch is for a customer that has a huge codebase and that is 
>>> the only reason for its existence.
>>
>> I didn't know gfortran as a whole has customers as such :-)
>>
>>> The error message has not changed. Making it more informative, 
>>> indicating an option that will allow this non-standard usage, is a 
>>> bad idea as it could result in its spread.
>>
>> OK, I understand that. So scrap the idea of pointing towards the
>> option.
>>
>> However, making it more informative _without_ pointing towards that
>> option is still a good idea (such as "missing item in format list").
> That's a much better idea. I'll implement that and when it's ready 
> I'll update the patch.

Patch updated and attached. ChangeLogs:

gcc/fortran

     Jim MacArthur  <jim.macarthur@codethink.co.uk>
     Mark Eggleston  <mark.eggleston@codethink.com>

     PR fortran/89103
     * gfortran.texi: Add -fdec-blank-format-item
     * invoke.texi: Add to section on Commas in FORMAT specifications.
     * io.c (check_format): Add new string missing_item.
     * io.c (check_format): At FMT_RPAREN goto finished if
     -fdec-blank-format-item otherwise set error string to missing_item.
     * lang.opt: Add new option.
     * options.c (set_dec_flags): Add SET_BITFLAG for
     flag_dec_format_defaults.

     Jim MacArthur <jim.macarthur@codethink.co.uk>
     Mark Eggleston <mark.eggleston@codethink.com>

gcc/testsuite

     PR fortran/89103
     * gfortran.dg/dec_format_empty_item_1.f: New test.
     * gfortran.dg/dec_format_empty_item_2.f: New test.
     * gfortran.dg/dec_format_empty_item_3.f: New test.

If OK, please can someone commit this.

>>
>> If we want to allow legacy extensions to clutter our code, getting
>> a more informative error message is something we can get in return,
>> at least.
>>
>> Regards
>>
>>     Thomas
>>
-- 
https://www.codethink.co.uk/privacy.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Allow-blank-format-items-in-format-strings.patch
Type: text/x-patch
Size: 8107 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190611/fd96a65c/attachment.bin>


More information about the Gcc-patches mailing list