This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: implement fdiagnostics-print-source-range-info
>>>>> "Diego" == Diego Novillo <dnovillo@google.com> writes:
Diego> I agree. If we are going to support ranges, it seems that making
Diego> location_t naturally support ranges is a better alternative. Unless
Diego> there are efficiency issues with the approach?
I don't think that we could easily change source_location to hold a
range. At least, I don't know how it would be done.
But, of course, every problem can be solved with a layer of indirection.
GCC's location_t could index into a table of start/end source_locations.
I suppose this could save memory overall if we had many trees sharing
start+end locations.
Tom