[patch, fortran] PR41075 Add unlimited format item [F2008]

Jerry DeLisle jvdelisle@verizon.net
Mon Aug 17 16:14:00 GMT 2009


On 08/17/2009 12:26 AM, Tobias Burnus wrote:
> On 08/17/2009 05:49 AM, Jerry DeLisle wrote:
>> The attached patch adds the unlimited format feature '*' to gfortran.
>> [...]
>> The feature allows some handy input/output for example when an array
>> size is not know until run time.  When used in conjunction with the g0
>> edit descriptor, you can read/write just about anything all chunk-ed
>> together.  I can see its usefulness for data serialization.
>
> It is also useful to write comma-separated values.
>
>> I have also attached a simple test case.  I should mention that right
>> now I do not check for nested '*' in a format string.  I think it may
>> be meaningless because you can never exhaust one to allow the other to
>> take effect.  We probably want to think about that and I have not
>> studied the F2008 standard in closer detail to see if there is indeed
>> a constraint defined.
> I could not find any constraint; printing an error is probably wrong,
> but one could print a warning, if one wants to.
>
>> Finally, of lesser import, I have modified several error checks to use
>> the %L feature to give some better error loci.
> Great! I think error loci were a weak point of gfortran.
>
>> Disallowing exponent width with D format specifier may be
>> controversial, though correct.
> How about just rejecting it for -std=f* ? I just tried the D edit
> descriptor with g95 -std=f90 -Wall, NAG f95, ifort, openf95 and sunf95:
> None of them rejected it (or warned about it) -  not even the very picky
> NAG f95 compiler.  Looking at my real-world code, I also found some
> usage of "D".
>
Committed without the D changes.  Will do that part separately.

Thanks,

Jerry



More information about the Gcc-patches mailing list