C++ Logo


Advanced search

Subject: Re: [ub] [c++std-ext-14555] Sized integer types and char bits
From: Xavier Leroy (Xavier.Leroy_at_[hidden])
Date: 2013-10-24 03:06:53

On 2013-10-24 06:35, Lawrence Crowl wrote:

> Having said that, my expectation is that programmers that care about
> [signed integer representation] also care about the size of the integer.

Not necessarily. Consider all the clever arithmetic tricks from the
book _Hacker's Delight_: most are independent of integer bit-size, but
most require two's complement representation.

> In that case, int32_t et.al. require a two's complement
> representation. The programmers that care should use those
> typedefs.

But they can't because these typedefs are optional.

> Net result, no change to the standard.

And no improvements for programmers who want to write portable code.

- Xavier Leroy

SG12 list run by herb.sutter at gmail.com