Subj : Re: RP2350 and Pico 2 - things missing To : Ahem A Rivet's Shot From : Richard Kettlewell Date : Thu Aug 29 2024 20:33:02 Ahem A Rivet's Shot writes: > Richard Kettlewell wrote: >> No, it’s not necessarily wrong. If the value fits in the destination >> type there’s nothing wrong with it. The results are well-defined and do >> not change the value. You can look up the rules in the C standard. > > What is wrong is making assumptions about the relative size of long > and size_t - AFAIK the standard makes no guarantees about that. Nobody is making any such assumption here. Everyone involved knows perfectly well that size_t could be a different size to long. > Note that it's only "wrong" if you care about portability - long > experience suggests that not caring about portability is a good way to > get bitten on the arse. The API in question is essentially fixed in this respect. Changing these details would break all the applications that the API supports. We just have to live with its infelicities regardless of how much anyone involved may care about portability. -- https://www.greenend.org.uk/rjk/ --- SoupGate-Win32 v1.05 * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3) .