Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: John Reagan Newsgroups: comp.os.vms Subject: Re: New VSI post on Youtube Date: Wed, 21 Aug 2024 10:21:17 +0200 Organization: i2pn2 (i2pn.org) Message-ID: <77842b73cf71703a6a5dfe45ac7b34b643d477be@i2pn2.org> References: <66bcf876$0$717$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 21 Aug 2024 08:21:17 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="3320671"; mail-complaints-to="usenet@i2pn2.org"; posting-account="85Cwws6+ypgQVu4foqgE6eSuYb0IIJZq6Fz6j0v4a/s"; User-Agent: Mozilla Thunderbird In-Reply-To: X-Spam-Checker-Version: SpamAssassin 4.0.0 Content-Language: en-US Bytes: 2800 Lines: 49 On 8/15/2024 1:58 AM, Arne Vajhøj wrote: > On 8/14/2024 7:47 PM, Lawrence D'Oliveiro wrote: >> On Wed, 14 Aug 2024 14:33:27 -0400, Arne Vajhøj wrote: >>> And it has different size of long and pointers. >> >> If you wanted an integer type that is compatible with pointers, that was >> always intptr_t and uintptr_t, surely > > > I am not being particular clear. > > I am not saying that: > > default sizeof long C++ x64 <> default sizeof pointer C++ x64 > > I am saying that: > > default sizeof long C++ x64 <> default sizeof long C++ Itanium & Alpha > default sizeof pointer C++ x64 <> default sizeof pointer C++ Itanium & > Alpha > > and later: > > default sizeof long C++ x64 <> default sizeof long C x64 > default sizeof pointer C++ x64 <> default sizeof pointer C x64 > > Arne > > > Yes, all good points. The size_t and offset_t = 32-bits and ptrdiff_t = 32-bits on Alpha/Itanium started the mess years ago. Personally, I would have kept all the defaults the same as Itanium but got "convinced" to go wider. The first attempt was ONLY 64-bit pointers on x86 with C++ but things like those pesky descriptors and itemlists got in the way. I did suggest an LP64, ILP32, etc qualifier but mostly got blank stares from other engineers as "too nerdy" long == 64-bits has caused us to make changes as prior header writers assumed that long was 32-bits. They should have all followed Arne's advice and used int32_t and int64_t when specifying their ABIs. I'll can take some ownership on the changes, but I suffered with years of "John, why is size_t 32-bits? Why does subtracting two 64-bit pointers only give me a 32-bit result?"