Sujet : Re: RP2350 and Pico 2 - things missing
De : steveo (at) *nospam* eircom.net (Ahem A Rivet's Shot)
Groupes : comp.sys.raspberry-piDate : 29. Aug 2024, 17:22:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240829172239.82bfba1bf925daa2e1f70ac1@eircom.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0)
On Thu, 29 Aug 2024 16:13:42 +0100
Richard Kettlewell <
invalid@invalid.invalid> 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. 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.
-- Steve O'Hara-SmithOdds and Ends at http://www.sohara.org/For forms of government let fools contestWhate're is best administered is best - Alexander Pope