Arthur Cohen <arthur.co...@embecosm.com> writes: > Using %lu to format size_t values breaks 32 bit targets, and %zu is not > supported by one of the hosts GCC aims to support - HPUX
But we do have uses of %zu in gcc/rust already! > diff --git a/gcc/rust/expand/rust-proc-macro.cc > b/gcc/rust/expand/rust-proc-macro.cc > index e8618485b71..09680733e98 100644 > --- a/gcc/rust/expand/rust-proc-macro.cc > +++ b/gcc/rust/expand/rust-proc-macro.cc > @@ -171,7 +171,7 @@ load_macros (std::string path) > if (array == nullptr) > return {}; > > - rust_debug ("Found %lu procedural macros", array->length); > + rust_debug ("Found %lu procedural macros", (unsigned long) array->length); Not the best way either: array->length is std::uint64_t, so the format should use ... %" PRIu64 " procedural... instead. I've attached my patch to PR rust/113461. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University