https://gcc.gnu.org/g:85018b146cd30a4a594b46cdb0e3683c8e908568

commit r15-6004-g85018b146cd30a4a594b46cdb0e3683c8e908568
Author: Lewis Hyatt <lhy...@gmail.com>
Date:   Fri Dec 6 19:01:37 2024 -0500

    Support for 64-bit location_t: libgdiagnostics parts
    
    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.

Diff:
---
 gcc/libgdiagnostics.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/libgdiagnostics.cc b/gcc/libgdiagnostics.cc
index e5cee0958f9c..53a8423f9045 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;
   }
   ~diagnostic_manager ()
   {
@@ -500,7 +500,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;

Reply via email to