[Patch, fortran] Fix PR19101 missing & in character continuation not caught
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Mar 8 23:39:00 GMT 2006
On Wed, Mar 08, 2006 at 09:39:07PM +0100, Paul Thomas wrote:
>
> >IMHO, it is an error to use a tab. As I stated, -fno-tabs or
> >-pedantic or -std=f95 are the only options that will trigger
> >the error.
> >
> >
> True enough; especially on the options.....
>
> >Your suggestion also doesn't handle the problem with fixed-form
> >source code with a tab in column 1. My current patch deals with
> >tab in fixed-form and free-form code in an almost consistent
> >manor (ie., the error messages are slightly different in that
> >a locus can be reported for free-form).
> >
> .....again true.
>
> I have to agree with your original title. I just tracked down a
> regression to a tab that appeared in an error message.
>
> OK by me but give it 24 hours for any further opinions, please.
>
I looked at using gfc_error_now and it leads to segfaults due
to freeing partially filled lines/namespaces/etc. So, I looked
at your gfc_warning_now suggestion. This actually works with
the caveat that in fixed form source a tab in column is reported
different than how it is reported in gfc_warning_now. I now
have
troutmask:sgk[208] cat t.f
program t
<tab>real x
<tab>x =<tab>1.
end program t
troutmask:sgk[209] gfc4x -fno-tabs t.f
Warning: Nonconforming tab character in column 1 of line 2
Warning: Nonconforming tab character in column 1 of line 3
In file t.f:3
x = 1.
1
Warning: Nonconforming tab character at (1)
I need to change the -f to a -W and update my gfortran.texi.
I'll submit a new patch in a few days.
--
Steve
More information about the Gcc-patches
mailing list