Path: csiph.com!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: CHAR_BIT is not eight
Date: Wed, 16 Nov 2022 05:41:59 -0800
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <86r0y3c8yg.fsf@linuxsc.com>
References: <361b04cd-8be4-48c5-bc78-229f145eb343n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="c33488f0e6c0635625a64620cc1d5893"; logging-data="2493557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/i23NxwpKRwG81icubVxScODCoggJskhE="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:nrgTxmXS6wgWqSyNFyM8ZLmXHZ8= sha1:ZG7bc9TUrNAIKbSVpXNEw+I8KXQ=
Xref: csiph.com comp.lang.c++:87415
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.
> Software without tests is just a work of literature.
A hyperbolic statement if ever there was one.