On Mon, 2024-12-02 at 19:56 -0500, Lewis Hyatt wrote: > On Mon, Dec 02, 2024 at 07:35:12PM -0500, David Malcolm wrote: > > On Sun, 2024-12-01 at 19:44 -0500, Lewis Hyatt wrote: > > > This patch is new in v3 and is a small change to libgdiagnostics > > > similar to > > > other changes required by 64-bit location_t. > > > > > > -- >8 -- > > > > > > Tweak libgdiagnostics.cc, which is necessarily sensitive to line- > > > map > > > internals, to support 64-bit location_t as well. > > > > > > gcc/ChangeLog: > > > > > > * libgdiagnostics.cc (struct diagnostic_manager): Use > > > location_t(-1) > > > instead of UINT_MAX to support 64-bit location_t as > > > well. > > > (diagnostic_manager::diagnostic_manager): Change hard- > > > coded > > > "5" to > > > line_map_suggested_range_bits. > > > --- > > > gcc/libgdiagnostics.cc | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/gcc/libgdiagnostics.cc b/gcc/libgdiagnostics.cc > > > index e5cee0958f9..53a8423f904 100644 > > > --- a/gcc/libgdiagnostics.cc > > > +++ b/gcc/libgdiagnostics.cc > > > @@ -320,7 +320,7 @@ public: > > > linemap_init (&m_line_table, BUILTINS_LOCATION); > > > m_line_table.m_reallocator = xrealloc; > > > m_line_table.m_round_alloc_size = round_alloc_size; > > > - m_line_table.default_range_bits = 5; > > > + m_line_table.default_range_bits = > > > line_map_suggested_range_bits; > > > > Is line_map_suggested_range_bits still a constant after the other > > patches in the kit? If so, this patch is OK for trunk. > > > > Thanks > > Dave > > Thanks, yes it is just a constant. It is 5 on current master and > would > change to 7 with these patches.
Thanks for clarifying. Patch is OK. FWIW, my concern was in case the patch was doing anything weird with the preprocessor to access global vars [1]; I'm happy that it's not. Dave [1] since with libgdiagnostics each diagnostic_manager has its own line_maps instance and its own diagnostic_context.