Sujet : Re: RP2350 and Pico 2 - things missing
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.sys.raspberry-piDate : 29. Aug 2024, 09:32:49
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwv4j73zq32.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
druck <
news@druck.org.uk> writes:
You can do this on Windows too, but they had to bastardise their C
compiler for people that hadn't. It's the only one that on a 64 bit
platform that has long as 32 bits.
>
Windows:-
>
int=32 bits, long=32 bits, long long=64 bits
>
Everyone else in the bloody world:-
(Almost everyone; Cray had 64-bit int.)
int=32 bits, long=64 bits, long long=64 bits
THe Windows approach is well within what the C language spec allows, and
simplified the adaptation of existing Windows application code to 64-bit
platforms. The equivalent exercise in Linux needed attention to anything
that made (sometimes invisible) assumptions about the definition of
long.
I don’t think I’d fault either decision though the fact that we’ve ended
up with two conventions does make writing/maintaining portable code a
bit more annoying, though not really any more so than the slightly
different set of things compilers warn about or the lack of GCC
compatibility from MSVC. I think MS should bow the inevitable and
replace cl with Clang.
-- https://www.greenend.org.uk/rjk/