aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-08-02 11:10:52 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2024-08-06 13:38:34 +0000
commitbccb35bca09f92d580b87dbb8ec81e1ed890b10a (patch)
tree821255557487c24d59848bd985b6f8d98a55b283 /gcc
parentd2f032feb04ac84a2de0f3d06547d5465b33a466 (diff)
downloadgcc-bccb35bca09f92d580b87dbb8ec81e1ed890b10a.zip
gcc-bccb35bca09f92d580b87dbb8ec81e1ed890b10a.tar.gz
gcc-bccb35bca09f92d580b87dbb8ec81e1ed890b10a.tar.bz2
borrowck: Fix debug prints on 32-bits architectures
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder.h3
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
index c0d79a7..183e330 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
@@ -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
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
index bb8feda..901b37b 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
@@ -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);