|
From: | Paul Eggert |
Subject: | Re: pdumper on Solaris 10 |
Date: | Tue, 17 Dec 2024 12:00:38 -0800 |
User-agent: | Mozilla Thunderbird |
On 2024-12-17 11:43, Pip Cet wrote:
In this case, the eventual destination is a pointer, so I don't see how a single cast would work.
Sorry, didn't know that. (The change I'm currently using does use an intermediate uintptr_t variable, but it's still two casts).If the source is a wide integer and there's an intermediate uintptr_t variable (which sounds like a good idea), then you should need only one cast: from uintptr_t to void * (or whatever pointer type you prefer).
I try to avoid casts in C whenever possible, since they're too powerful. So I'd prefer a one-cast to a two-cast approach.
[Prev in Thread] | Current Thread | [Next in Thread] |