aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-06-03 23:01:34 +0200
committerPhilip Herron <philip.herron@embecosm.com>2021-06-05 17:18:39 +0100
commitb2fd4346a65289390342fb61815b11926945416e (patch)
tree55ebb03e7df6c38b62db0389684729b0745ea12f /gcc
parent1f1d9ed87d3e870f8e64ea28ba3e6bc898502255 (diff)
downloadgcc-b2fd4346a65289390342fb61815b11926945416e.zip
gcc-b2fd4346a65289390342fb61815b11926945416e.tar.gz
gcc-b2fd4346a65289390342fb61815b11926945416e.tar.bz2
Use PRIx64 to print 64bit hex values in legacy_hash
* gcc/rust/backend/rust-compile.cc (legacy_hash): lo and hi are uint64_t use PRIx64 to print them as hex values instead of %lx which is target specific.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/backend/rust-compile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc
index 480afc8b..ea21ad3 100644
--- a/gcc/rust/backend/rust-compile.cc
+++ b/gcc/rust/backend/rust-compile.cc
@@ -442,7 +442,7 @@ legacy_hash (const std::string &fingerprint)
char hex[16 + 1];
memset (hex, 0, sizeof hex);
- snprintf (hex, sizeof hex, "%08lx%08lx", lo, hi);
+ snprintf (hex, sizeof hex, "%08" PRIx64 "%08" PRIx64, lo, hi);
return "h" + std::string (hex, sizeof (hex) - 1);
}