Expand debug to contain more than 31 cases

Pavel Sanda sanda at lyx.org
Tue Apr 26 12:28:08 UTC 2022


On Mon, Apr 25, 2022 at 09:35:46PM +0200, Kornel Benko wrote:
> > Can you explain to me what is the reason for "weakly opposing" it?
> 
> Yes, the code does no harm, only gave me a guaranty.
> I read somewhere that 64 bit for long long was a 'should' and not a 'must'.

Nope, we are in the 'must' regime. Or rather 'shall' which is used in the standard.

In ANSI ISO/IEC 9899 (second edition 1999-12-01) "Programming languages - C"
(the one I easily have access to right now and which is referenced by C++ norm):

4.
In this International Standard, "shall" is to be interpreted as a requirement on an implementation or on a program; ...
....

5.2.4.2.1 Size of integer types
.. 
Their implementation-defined values shall be equal or greater in magnitude (absolute value) to those shown, with the same sign.
...
- minimum value for an object of type long long int LLONG_MIN -9223372036854775807 // ?(2^63 - 1)
- maximum value for an object of type long long int LLONG_MAX +9223372036854775807 // 2^63 - 1 
- maximum value for an object of type unsigned long long int ULLONG_MAX 18446744073709551615 // 2^64 - 1

> But int64_t _has_ to contain valid 64 bits.

I hope I made clear long long satisfies your thirst for 33 bits as well and does not rely on any unnecessary includes.

Pavel


More information about the lyx-devel mailing list