Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Iain, On 1/18/24 12:02, Iain Sandoe wrote: Hi Arthur, On 18 Jan 2024, at 10:30, Arthur Cohen wrote: On 1/18/24 10:13, Rainer Orth wrote: Arthur Cohen 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 -

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Rainer, On 1/18/24 10:34, Rainer Orth wrote: Hi Arthur, Yes, I was talking about this on IRC the other day - if we do run in a situation where we have more than UINT32_MAX procedural macros in memory we have big issues. These debug prints will probably end up getting removed soon as they

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Iain Sandoe
Hi Arthur, > On 18 Jan 2024, at 10:30, Arthur Cohen wrote: > On 1/18/24 10:13, Rainer Orth wrote: >> Arthur Cohen 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

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Rainer Orth
Hi Arthur, > Yes, I was talking about this on IRC the other day - if we do run in a > situation where we have more than UINT32_MAX procedural macros in memory > we have big issues. These debug prints will probably end up getting removed > soon as they clutter the output a lot for little

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
Hi Rainer, On 1/18/24 10:13, Rainer Orth wrote: Arthur Cohen 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

Re: [COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Rainer Orth
Arthur Cohen 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 >

[COMMITTED] rust_debug: Cast size_t values to unsigned long before printing.

2024-01-18 Thread Arthur Cohen
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 gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address): Cast size_t value to unsigned long. *