+ If SHOW_CARET_P is true, then the range should be rendered with + a caret at its starting location. This + is for use by the Fortran frontend, for implementing the + "%C" and "%L" format codes. */ + +void +rich_location::set_range (unsigned int idx, source_range src_range, + bool show_caret_p, bool overwrite_loc_p)
I do not understand when is this show_caret_p used by Fortran given the diagnostic_show_locus code mentioned earlier. Related to this: inline void set_location (unsigned int idx, location_t loc, bool caret_p) is always called with the last parameter 'true' (boolean parameters are always almost bad API). Do you really need this parameter? +/* Overwrite the range within this text_info's rich_location. + For use e.g. when implementing "+" in client format decoders. */ If we got rid of '+' we would not need this extra work. Also '+' breaks #pragma diagnostics. Not the fault of your patch, but it just shows that technical debt keeps accumulating. https://gcc.gnu.org/wiki/Partial_Transitions Cheers, Manuel.