http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
> > One might handle this in a more clever way, but can't you use in
> > gfc_warning2, gfortran's normal "locus" and use
> > linemap_position_for_column() to map from the offset to the column?
> 
> You cannot insert new locations out of order in a line-map. Perhaps one
> could create a dummy line-map, but it would be easier if the diagnostics
> machinery handled arbitrary offsets, so I would favor that. Arbitrary
> offsets are useful also to other FEs for some special cases anyway.
> 
> Of course, the two things are not incompatible: 1) gfortran could use the
> full linemaps for tracking column numbers, thus removing another duplication
> of code  and 2) for particular cases, the diagnostic machinery could handle
> explicit offsets passed by gfortran.

Or in other words: This PR can be fixed without gfortran tracking
column-numbers using line-maps (just using an explicit offset), but you'll need
that for fixing PR 53934.

Reply via email to