On Wed, 2024-11-20 at 23:10 -0500, Lewis Hyatt wrote: > On Wed, Nov 20, 2024 at 11:58:30AM +0100, Richard Biener wrote: > > On Sun, Nov 17, 2024 at 4:24 AM Lewis Hyatt <lhy...@gmail.com> > > wrote: > > > > > > Prepare libcpp to support 64-bit location_t, without yet making > > > any functional changes, by adding new typedefs that enable code > > > to be > > > written such that it works with any size location_t. Update the > > > usage of > > > line maps within libcpp accordingly. > > > > > > Subsequent patches will prepare the rest of the codebase > > > similarly, and then > > > afterwards, location_t will be changed to uint64_t. > > > > This is OK if there's no comment from libcpp maintainers this week. > > > > Thanks, > > Richard. > > Thank you, and thanks for going through the other patches, really > appreciate > it. > > I CCed David to make sure he doesn't have any concerns about this > patch > or the others as well. (Especially since libdiagnostics is now in GCC > 15, I > hope they will be a useful improvement from that perspective too... > it would > be nice if it launches out of the gate without that limitation.)
Thanks; sorry for not commenting before. The patches look great to me, I'm happy to see this improvement. > > BTW, since libdiagnostics has been committed in the meantime since I > sent > these out. There is a two-line patch that should be added to this > series to > prepare libdiagnostics for 64-bit location_t as well. I'll submit it > with > the next version of the patches, but FYI it would be: > > === > > diff --git a/gcc/libdiagnostics.cc b/gcc/libdiagnostics.cc > index c06d3bc722f..9e054c89d31 100644 > --- a/gcc/libdiagnostics.cc > +++ b/gcc/libdiagnostics.cc > @@ -321,7 +321,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; > } > ~diagnostic_manager () > { > @@ -501,7 +501,7 @@ private: > impl_client_version_info m_client_version_info; > std::vector<std::unique_ptr<sink>> m_sinks; > hash_map<nofree_string_hash, diagnostic_file *> m_str_to_file_map; > - hash_map<int_hash<location_t, UNKNOWN_LOCATION, UINT_MAX>, > + hash_map<int_hash<location_t, UNKNOWN_LOCATION, location_t (-1)>, > diagnostic_physical_location *> m_location_t_map; > std::vector<std::unique_ptr<diagnostic_logical_location>> > m_logical_locs; > const diagnostic *m_current_diag; > > === Thanks! Dave