Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: for-loop mutates to an endless-loop Date: Sat, 04 Jan 2020 13:47:37 -0800 Organization: None to speak of Lines: 38 Message-ID: <87blriopvq.fsf@nosuchdomain.example.com> References: <87d0bznqh9.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="ae6c07825fe602dea7ed53b20475ec70"; logging-data="23288"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+j/nXlwqUPEtkPOCt4LMBV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:CXyPpcXeqYBleCUvo0RHxwh7dEk= sha1:cWgyZw3aB13pQhfRLt1rVVzXF6U= Xref: csiph.com comp.lang.c:148772 David Brown writes: > On 04/01/2020 18:43, Walter H. wrote: >> On 04.01.2020 17:20, Ben Bacarisse wrote: >>> "Walter H."  writes: >>> >>> Most (all?) 64-bit Linux systems have 64-bit long. >> >> I see, and this fact reduces the portability to a minimum; >> 64-bit Windows systems have 32-bit long. > > I think you have that backwards - the fact that MS decided to make > "long" on 64-bit Windows merely 32-bit, when the rest of the 64-bit > world had 64-bit long, reduced portability. [...] Yes and no. Making long 32 bits while most other 64-bit platforms make it 64 bits limits the portability of code that assumes that long is 64 bits, or that pointers are the same size as long. Making long 64 bits would limit the portability of code that assumes that long is 32 bits -- and apparently there's a lot of code like that on Windows. Either choice is perfectly valid, and does not hurt the portability of well-written code that doesn't assume a particular size for type long. Microsoft had a choice between possibly breaking code written for other platforms, and possibly breaking code written for earlier versions of Windows. I find it difficult to argue that they made the wrong choice. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com [Note updated email address] Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */