]> 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)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 12 Aug 2024 13:07:01 +0000 (15:07 +0200)
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 e9108703be1d93913089dfd0719f7dbed7f9f72d..6b29eaeba5a89c8d0ec15bf4ffaba90c6defe063 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 6601c981779f9c7f4f25e85f79d128616d739b93..1cd6b4d480d8071f459e206eb725c6f91725e139 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);