On 25 September 2014 13:39, Dodji Seketeli <do...@redhat.com> wrote: >> 2) In the Fortran FE, which gives quite precise location information >> by tracking the characters that it wants to warn about instead of >> relying on the line-map machinery. > > So with this feature, the Fortran FE would then use the then more > "generic" diagnostics machinery, right?
This is the plan. The benefits will be more shared code, deleting a lot of duplicated stuff in the Fortran FE and supporting in Fortran all the goodies of GCC (#pragmas, color, options printing, macro unwinder). However, the Fortran FE still has a long way to go to make use of all the features of the common diagnostics machinery.. On the bright side, the common diagnostics machinery already supports all features of the Fortran FE except for offset locations, multiple locations (and multiple carets), and buffered diagnostics (well, the diagnostics machinery does buffer, but there is no API to clear the buffer without printing it). I think a bunch of FE diagnostic calls could already use the common machinery (some are already using it). Unfortunately, most Fortran diagnostics use offset locations because the FE does not track the locations of tokens with line-maps (I think the locations are computed but not stored or passed down to the diagnostic functions). The work to be done is not even technically difficult. The lack of progress on this is due, as always, to lack of time by the people currently working on GCC and/or lack of new contributors. Cheers, Manuel.