-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 24.04.2016 13:47, lh_mouse wrote:
> On 2016-04-24 18:36, LRN wrote:
>> On 24.04.2016 12:40, lh_mouse wrote:
>>> On 2016-04-23 03:38, LRN wrote:
On 22.04.2016 20:24, LRN wrote:
> This matches the behaviour of MSVC better in cases when ther
You can't represent 0x8000 using a 32-bit value just because it is postive.
I am not talking about bit representations but their mathematical values.
The C standard does not care about bit representations of signed integers,
either.
I would suggest you cast them to 'unsigned' instead of 'int'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 24.04.2016 12:40, lh_mouse wrote:
> On 2016-04-23 03:38, LRN wrote:
>> On 22.04.2016 20:24, LRN wrote:
>>> This matches the behaviour of MSVC better in cases when there is a
>>> mix of values < 0 and values > 0x7FFF in the same enum, which,
>>
Within both MS ABI and Itanium ABI for x64, sizeof(int) is 4.
And FWIW, here is the reason of the enumeration problem:
Quoting from WG14 N1570 (Programming languages — C)
[quote]
6.7.2.2 Enumeration specifiers
4 Each enumerated type shall be compatible with char, a signed integer type, or
an
uns