Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: CHAR_BIT is not eight Date: Wed, 16 Nov 2022 10:38:27 -0800 Organization: None to speak of Lines: 46 Message-ID: <87mt8qkan0.fsf@nosuchdomain.example.com> References: <361b04cd-8be4-48c5-bc78-229f145eb343n@googlegroups.com> <86r0y3c8yg.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="6f88ab123a4a8d9a574caed605fe06a9"; logging-data="2543243"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QatcrMG3rWW8Kd4XaG+9Z" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:TbRcQ2HagWPyc3huqAScP37hrZ0= sha1:vTZueaZ9xRhJA1stvw+pApK0Oqs= Xref: csiph.com comp.lang.c++:87418 Tim Rentsch writes: > Paavo Helde writes: > >> 14.10.2022 08:54 Juha Nieminen kirjutas: >> >>> David Brown wrote: >>> >>>> It is very rare that "as portable as possible" is a realistic >>>> specification. It happens, but it is not common. >>> >>> "Not common" does not mean "you shouldn't care", when you are writing >>> a library that could potentially be used in more exotic architectures, >>> such as the one mentioned in this thread. >>> >>> For example if you are writing, say, a small library that >>> calculates hashes or checksums using a particular algorithm. It's >>> not at all unrealistic that such a library could have uses in these >>> more exotic microcontrollers (as microcontrollers are often used in >>> embedded systems that handle data somehow, and might be interested >>> in calculating things like checksums and hashes). And it is quite >>> likely that such an algorithm might care about bit sizes. >> >> True, but for really supporting such exotic platforms one would need >> to run tests on these platforms (or at least in an emulator) during >> the development and potentially also later if anything changes. > > Perhaps some tests, but not necessarily all tests. Any parts of > the program that are verifiably platform agnostic would not need > platform-specific re-testing. Also, any platform-specific tests > don't have to be run during development, but only just before the > program is deployed on the exotic platforms in question, which > could be significantly later than the original development. How do you know that a part of program is "verifiably platform agnostic" without platform-specific testing? How else would that be verified? >> Software without tests is just a work of literature. > > A hyperbolic statement if ever there was one. Sure, but only slightly hyperbolic. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for XCOM Labs void Void(void) { Void(); } /* The recursive call of the void */