Deutsch   English   Français   Italiano  
<vtiasi$msjl$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: do { quit; } else { }
Date: Mon, 14 Apr 2025 08:44:34 +0200
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <vtiasi$msjl$1@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me> <86ecy5fjin.fsf@linuxsc.com>
 <20250406190321.000001dc@yahoo.com> <86plhodtsw.fsf@linuxsc.com>
 <20250407210248.00006457@yahoo.com> <vt15lq$bjs0$3@dont-email.me>
 <vt2lp6$1qtjd$1@dont-email.me> <vt31m5$2513i$1@dont-email.me>
 <vt3d4g$2djqe$1@dont-email.me> <vt3iqh$2ka99$1@dont-email.me>
 <vt5fed$ccri$1@dont-email.me> <vt5js2$g1t7$1@dont-email.me>
 <20250409142303.00004645@yahoo.com> <87ikndqabc.fsf@nosuchdomain.example.com>
 <20250410115501.000037a5@yahoo.com> <vt8ei8$2vn84$1@dont-email.me>
 <20250410080629.532@kylheku.com> <vt94q5$3jjod$1@dont-email.me>
 <vt9628$3hhr8$3@dont-email.me> <vtammh$174ev$1@dont-email.me>
 <vtavn9$1dp7m$3@dont-email.me> <87r01ysgxb.fsf@nosuchdomain.example.com>
 <20250413205703.000059ce@yahoo.com> <vth16f$3g7ar$1@dont-email.me>
 <20250413221457.000029b3@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Apr 2025 08:44:36 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2b20dc5fefc13099777f2dd56b872f45";
	logging-data="750197"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19TNdBZLpZgZtlauVDWFHdiFfHpY4FWp3s="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:lkCMJcgJnLbEKgMJ0+0GYtdLKiI=
Content-Language: en-GB
In-Reply-To: <20250413221457.000029b3@yahoo.com>
Bytes: 3884

On 13/04/2025 21:14, Michael S wrote:
> On Sun, 13 Apr 2025 20:53:03 +0200
> David Brown <david.brown@hesbynett.no> wrote:
> 
>> On 13/04/2025 19:57, Michael S wrote:
>>> On Fri, 11 Apr 2025 11:15:44 -0700
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>    
>>>> bart <bc@freeuk.com> writes:
>>>> [...]
>>>>> 8 A u64 type can be denoted as either 'uint64_t' OR as some
>>>>> combination of the tokens (long, long, unsigned, [int])
>>>>
>>>> "uint64_t" and "unsigned long long int" do not mean the same thing.
>>>>   
>>>
>>> And it's a PITA.
>>>    
>>
>> There is only one thing I find a little bit annoying about the sized
>> integer types in C - the printf specifiers.
> 
> 
> Yes, in practice it is the main reason why I find absence of
> system-independent correspondence between [u]intn_t types and basic
> integer types a PITA. But there exist few other cases where it causes
> problems, e.g. using Intel intrinsic like _addcarry_u64() in code that
> have to be compiled on different 64-bit OSes.

I don't find that a PITA, because I don't have to write such code :-)

(I appreciate that other people might have things they don't like about 
the sized integer types, or have code for which potential 
incompatibilities between types with the same size and representation 
can be annoying.  I can only complain about the things I find annoying.)

> 
> As to why you feel stronger than you about it, I'd guess it's because I
> write code that has to be compiled, preferably without warnings, on
> different platforms more often than you do. Most of 32-bit and 64-bit
> platforms are compatible to each other, but 64-bit Unix/Linus is at
> odds with the rest of them.
> 

My targets for C (and C++) are mostly 32-bit ARM these days, and the 
smaller microcontrollers I sometimes use are consistent with ARM in 
having "uint32_t" be "unsigned long int".  I occasionally also target 
64-bit Linux, but I haven't had any issues there either - but that may 
be due to the type of code I have written.