Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #7482
| From | "Gary R. Schmidt" <grschmidt@acm.org> |
|---|---|
| Newsgroups | comp.programming.threads, comp.lang.c |
| Subject | Re: Linus Torvalds prepares to move the Linux kernel to modern C |
| Date | 2022-03-03 14:56 +1100 |
| Message-ID | <fsq5fi-0hh.ln1@paranoia.mcleod-schmidt.id.au> (permalink) |
| References | (3 earlier) <svmsrh$6j9$1@dont-email.me> <svnsgk$b0g$1@dont-email.me> <svobnq$d5p$1@dont-email.me> <svofvi$kbb$1@dont-email.me> <svp5qm$ls3$1@dont-email.me> |
Cross-posted to 2 groups.
On 03/03/2022 12:32, Lynn McGuire wrote:
> On 3/2/2022 1:19 PM, Bart wrote:
>> On 02/03/2022 18:06, rthiebaud wrote:
>>>>>>>> standard.
>>>>>>>>
>>>> * Whole-program compilers
>>>> * 64-bit everything (C is still stuck on 32-bits)
>>>> * Super-fast compilers ...
>>> Who says
>>> C is stuck is 32 bits?
>>
>> It just is. While versions with 64-bit ints might be knocking about,
>> generally they have to be compatible with what C already does on a
>> given platform. And that usually means int = 32 bits.
>>
>> So, while people can choose to use long long int or int64_t, they have
>> to explicity state that everywhere, because:
>>
>> 12345 is int32
>> 'A' is int32
>> short a,b,c;
>> a*b*c is int32 (so could overflow)
>> %d means int32 format
>> sprintf returns int32
>> f(){} defaults to int32 return type
>> int64_t a,b;
>> a && b is int32
>> !a is int32
>> enum E {a=5000000000};
>> enum E xx; is int32 (int64 on some compilers with extensions)
>>
>> etc
>
> Well, that is a bummer. That means that I will have to explicitly type
> everything int64 when we move to Win64.
>
> I already knew that I was going to have to change all the integer types
> in my Fortran code integer*8 but I expected 64 bit C to treat int at 64
> bit.
On 64-bit Linux, the default gcc instance builds 64-bit binaries, using
the I32LP64 model.
The Alpha was nice, it's default was ILP64.
Winderrs is worse, it use IL32P64, I'll leave dealing with the
assumptions C programmers have made over the decades to your imagination.
I've been using my own set of typedefs to control things since the early
1990's, and being hard on myself and occasional minions about not using
"int" anywhere. Edit one header file and everything is as big/small as
you need/want. :-)
Cheers,
Gary B-)
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Linus Torvalds prepares to move the Linux kernel to modern C Amine Moulay Ramdane <aminer68@gmail.com> - 2022-02-28 08:43 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-02-28 18:44 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-02-28 19:26 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C rthiebaud <thiebauddick2@aol.com> - 2022-02-28 20:29 -0500
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-02-28 20:23 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-01 11:34 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 14:31 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C David Brown <david.brown@hesbynett.no> - 2022-03-01 17:25 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 18:13 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C David Brown <david.brown@hesbynett.no> - 2022-03-01 19:42 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 19:56 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Vir Campestris <vir.campestris@invalid.invalid> - 2022-03-03 21:41 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-01 15:14 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Kaz Kylheku <480-992-1380@kylheku.com> - 2022-03-01 01:37 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Manu Raju <MR@invalid.invalid> - 2022-03-01 05:11 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 08:31 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-03-01 22:45 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 05:46 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-02 13:47 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C rthiebaud <thiebauddick2@aol.com> - 2022-03-02 13:06 -0500
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-02 19:19 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-03-02 19:32 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Gary R. Schmidt" <grschmidt@acm.org> - 2022-03-03 14:56 +1100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 14:02 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Manfred <noname@add.invalid> - 2022-03-03 15:09 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 15:14 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:17 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-02 14:42 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:18 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-02 18:33 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:39 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-02 11:05 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-03 12:25 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 21:37 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-03 12:59 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-04 11:35 +0100
csiph-web