]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
borrowck: Fix debug prints on 32-bits architectures
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 2 Aug 2024 09:10:52 +0000 (11:10 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Tue, 6 Aug 2024 13:38:34 +0000 (13:38 +0000)
gcc/rust/ChangeLog:

* checks/errors/borrowck/rust-bir-builder.h: Cast size_t values to unsigned
long before printing.
* checks/errors/borrowck/rust-bir-fact-collector.h: Likewise.

gcc/rust/checks/errors/borrowck/rust-bir-builder.h
gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h

index c0d79a7380ae0f95b5c5ba1c5c601fb7749753d5..183e330fe956b3482bb3d9dd592f9dd56ad3e508 100644 (file)
@@ -91,7 +91,8 @@ private:
          ctx.fn_free_regions[bound.second.get_index ()]);
 
        auto last_bound = universal_region_bounds.back ();
-       rust_debug ("\t\t %ld: %ld", last_bound.first, last_bound.second);
+       rust_debug ("\t\t %lu: %lu", (unsigned long) last_bound.first,
+                   (unsigned long) last_bound.second);
       }
 
     // TODO: handle type_region constraints
index bb8fedaf3db7b0899eb02a98ab1b315aaf685b39..901b37be8d1927fa94580d207872ea772d765406 100644 (file)
@@ -621,14 +621,16 @@ protected: // Generic BIR operations.
 protected: // Subset helpers.
   void push_subset (FreeRegion lhs, FreeRegion rhs)
   {
-    rust_debug ("\t\tpush_subset: '?%lu: '?%lu", lhs, rhs);
+    rust_debug ("\t\tpush_subset: '?%lu: '?%lu", (unsigned long) lhs,
+               (unsigned long) rhs);
 
     facts.subset_base.emplace_back (lhs, rhs, get_current_point_mid ());
   }
 
   void push_subset_all (FreeRegion lhs, FreeRegion rhs)
   {
-    rust_debug ("\t\tpush_subset_all: '?%lu: '?%lu", lhs, rhs);
+    rust_debug ("\t\tpush_subset_all: '?%lu: '?%lu", (unsigned long) lhs,
+               (unsigned long) rhs);
 
     for (auto point : cfg_points_all)
       facts.subset_base.emplace_back (lhs, rhs, point);